﻿namespace HRM.CORE
{
    using DevExpress.Data;
    using DevExpress.Utils;
    using DevExpress.XtraBars;
    using DevExpress.XtraBars.Docking;
    using DevExpress.XtraEditors;
    using DevExpress.XtraEditors.Controls;
    using DevExpress.XtraEditors.Repository;
    using DevExpress.XtraGrid;
    using DevExpress.XtraGrid.Columns;
    using DevExpress.XtraGrid.Views.Base;
    using DevExpress.XtraGrid.Views.Grid;
    using APP.HELPER;
    using Common.Base;
    using Common.Class; using APP.HELPER.Utils.Language; using Security.Security; using Dictionary.ERP;
    using HRM.CORE;
    using HRM.CORE.CLASS;
    using HRM.CORE.REPORT;
    
    
    
    using System; using Extra.ERP;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms; using Common;
    using Extra.ERP;
    using APP.HELPER.Utils;
    using Common;

    public class xucTimekeeperTableHour : Common.xucBase
    {
        private Bar bar1;
        private BarButtonItem barButtonItem3;
        private BarDockControl barDockControlBottom;
        private BarDockControl barDockControlLeft;
        private BarDockControl barDockControlRight;
        private BarDockControl barDockControlTop;
        private BarManager barManager1;
        private BarEditItem bbeTimeKeeperTableListName;
        private BarEditItem bbeYear;
        private BarButtonItem bbiClose;
        private BarButtonItem bbiExport;
        private BarButtonItem bbiFinish;
        private BarButtonItem bbiLock;
        private BarButtonItem bbiOpen;
        private BarButtonItem bbiPrint;
        private BarButtonItem bbiReload;
        private BarButtonItem bbiSave;
        private BarButtonItem bbiTimekeeperExtraPrivate;
        private BarButtonItem bbiTimekeeperTable;
        private BarButtonItem bbiTimekeeperTable1;
        private Common.Class.clsAllOption clsAllOption = new Common.Class.clsAllOption();
        private GridColumn colBranchName;
        private GridColumn colDay1;
        private GridColumn colDay10;
        private GridColumn colDay11;
        private GridColumn colDay12;
        private GridColumn colDay13;
        private GridColumn colDay14;
        private GridColumn colDay15;
        private GridColumn colDay16;
        private GridColumn colDay17;
        private GridColumn colDay18;
        private GridColumn colDay19;
        private GridColumn colDay2;
        private GridColumn colDay20;
        private GridColumn colDay21;
        private GridColumn colDay22;
        private GridColumn colDay23;
        private GridColumn colDay24;
        private GridColumn colDay25;
        private GridColumn colDay26;
        private GridColumn colDay27;
        private GridColumn colDay28;
        private GridColumn colDay29;
        private GridColumn colDay3;
        private GridColumn colDay30;
        private GridColumn colDay31;
        private GridColumn colDay4;
        private GridColumn colDay5;
        private GridColumn colDay6;
        private GridColumn colDay7;
        private GridColumn colDay8;
        private GridColumn colDay9;
        private GridColumn colDepartmentName;
        private GridColumn colEmployeeCode;
        private GridColumn colFirstName;
        private GridColumn colGroupName;
        private GridColumn colLastName;
        private GridColumn colShift;
        private GridColumn colShiftCode;
        private GridColumn colTotalHour;
        private IContainer components = null;
        private DockManager dockManager1;
        private DockPanel dockPanel1;
        private ControlContainer dockPanel1_Container;
        public DataTable dt_Timekeeper = new DataTable();
        private FlowLayoutPanel flowLayoutPanel1;
        private FlowLayoutPanel flowLayoutPanel2;
        private FlowLayoutPanel flowLayoutPanel3;
        private GridView gbList;
        private GridControl gcList;
        private GridColumn gridColumn1;
        private AutoHideContainer hideContainerLeft;
        public DevExpress.Utils.ImageCollection imageCollection2;
        private LabelControl lbBranchName;
        private LabelControl lbCompanyName;
        private LabelControl lbDepartmentName;
        private LabelControl lbGroupName;
        private LabelControl lbMessage;
        private LabelControl lbTimeKeeperOverTimeName;
        private string m_Code = MyLogin.Code;
        private string m_CompanyName = "";
        private System.DateTime m_Date;
        private double m_DayHour = 0.0;
        private int m_EarlyMinute = 0;
        private string m_EmployeeCode = "";
        private double m_Hour = 0.0;
        private bool m_IsEditValueChanged = true;
        private bool m_IsFinish = false;
        private bool m_IsLock = false;
        private bool m_IsOvertime = false;
        private bool m_IsSetRowCellValue = true;
        private bool m_IsWork = true;
        private int m_LateMinute = 0;
        private int m_Level = MyLogin.Level;
        private int m_Month = 0;
        private double m_NightHour = 0.0;
        private double m_OldHour = 0.0;
        private string m_ShiftCode = "";
        private string m_Symbol = "";
        private System.DateTime m_TimeIn;
        private Guid m_TimeKeeperTableListID = Guid.Empty;
        private System.DateTime m_TimeOut;
        private int m_Year = 0;
        private PanelControl panelControl1;
        private PopupMenu popupMenu1;
        private PopupContainerControl ppContainerControl = new PopupContainerControl();
        private PictureBox ptFinish;
        private PictureBox ptLock;
        private RepositoryItemCalcEdit repCal;
        private GridView repositoryItemGridLookUpEdit2View;
        private RepositoryItemPopupContainerEdit repPopup;
        private RepositoryItemGridLookUpEdit repTimeKeeperList;
        private RepositoryItemTimeEdit repYear;
        private SimpleButton simpleButton1;
        private string x_OEmployeeCode;
        private double x_TotalHour = 0.0;
        private xucExpandCollapseButton xucExpandCollapseButton1;
        public xucOrganization xucOrganization1;
        private HRM.CORE.xucTimekeepingAdd xucTimekeepingAdd = new HRM.CORE.xucTimekeepingAdd();

        public event ClosedHandler Closed;

        public event TimekeeperTableDeletedHandler TimekeeperTableDeleted;

        public event TimekeeperTableInsertedHandler TimekeeperTableInserted;

        public event TimekeeperTableSelectedHandler TimekeeperTableSelected;

        public event UnShiftDataHandler UnShiftData;

        public xucTimekeeperTableHour()
        {
            this.InitializeComponent();
            base.RestoreLayout(this.gbList, this);
            this.Init();
        }

        private void bbeTimeKeeperTableListName_EditValueChanged(object sender, EventArgs e)
        {
            HRM_TIMEKEEPER_TABLELIST hrm_timekeeper_tablelist = new HRM_TIMEKEEPER_TABLELIST();
            HRM_TIMEKEEPER_TABLEHOUR hrm_timekeeper_tablehour = new HRM_TIMEKEEPER_TABLEHOUR();
            Guid timeKeeperTableListID = this.m_TimeKeeperTableListID;
            this.gcList.DataSource = hrm_timekeeper_tablehour.GetList(this.m_Level, this.m_Code, timeKeeperTableListID);
            hrm_timekeeper_tablelist.GetByID(timeKeeperTableListID);
            this.m_Month = hrm_timekeeper_tablelist.Month;
            this.m_Year = hrm_timekeeper_tablelist.Year;
            this.lbTimeKeeperOverTimeName.Text = "Bảng Chấm C\x00f4ng Th\x00e1ng " + this.m_Month.ToString() + " - " + this.m_Year.ToString() + " (Theo Giờ C\x00f4ng)";
            this.m_IsLock = hrm_timekeeper_tablelist.IsLock;
            this.m_IsFinish = hrm_timekeeper_tablelist.IsFinish;
            this.InitInterface();
        }

        private void bbeYear_EditValueChanged(object sender, EventArgs e)
        {
            try
            {
                this.m_Year = Convert.ToDateTime(this.bbeYear.EditValue.ToString()).Year;
                this.LoadTimeKeeperTableList();
            }
            catch
            {
            }
        }

        private void bbiClose_ItemClick(object sender, ItemClickEventArgs e)
        {
            this.RaiseClosedHandler();
        }

        private void bbiExport_ItemClick(object sender, ItemClickEventArgs e)
        {
            base._exportView = this.gbList;
            SYS_LOG.Insert("Bảng Chấm C\x00f4ng Th\x00e1ng Theo Giờ", "Xuất");
            base.Export();
        }

        private void bbiFinish_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!ClsOption.System2.IsQuestion || (XtraMessageBox.Show("Bạn c\x00f3 chắc l\x00e0 muốn thực hiện t\x00e1c vụ n\x00e0y kh\x00f4ng?" + Environment.NewLine + " T\x00e1c vụ n\x00e0y được hiểu l\x00e0 bạn đ\x00e3 ho\x00e0n th\x00e0nh bảng chấm c\x00f4ng của th\x00e1ng n\x00e0y!", "Th\x00f4ng b\x00e1o", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.No))
            {
                HRM_TIMEKEEPER_TABLELIST hrm_timekeeper_tablelist = new HRM_TIMEKEEPER_TABLELIST();
                if (hrm_timekeeper_tablelist.Finish(this.m_TimeKeeperTableListID).ToString() == "OK")
                {
                    this.m_IsLock = true;
                    this.m_IsFinish = true;
                    this.InitInterface();
                }
                else
                {
                    MessageBox.Show("Fail!");
                }
            }
        }

        private void bbiLock_ItemClick(object sender, ItemClickEventArgs e)
        {
            HRM_TIMEKEEPER_TABLELIST hrm_timekeeper_tablelist = new HRM_TIMEKEEPER_TABLELIST();
            if (hrm_timekeeper_tablelist.Lock(this.m_TimeKeeperTableListID).ToString() == "OK")
            {
                this.m_IsLock = true;
                this.InitInterface();
            }
            else
            {
                MessageBox.Show("Fail!");
            }
        }

        private void bbiOpen_ItemClick(object sender, ItemClickEventArgs e)
        {
            HRM_TIMEKEEPER_TABLELIST hrm_timekeeper_tablelist = new HRM_TIMEKEEPER_TABLELIST();
            if (hrm_timekeeper_tablelist.Open(this.m_TimeKeeperTableListID).ToString() == "OK")
            {
                this.m_IsLock = false;
                this.InitInterface();
            }
            else
            {
                MessageBox.Show("Fail!");
            }
        }

        private void bbiPrint_ItemClick(object sender, ItemClickEventArgs e)
        {
            new xfmOptionPrintTimekeeperTable(this.m_Level, this.m_Code, this.m_Month, this.m_Year, 2).ShowDialog();
        }

        private void bbiReload_ItemClick(object sender, ItemClickEventArgs e)
        {
            this.LoadGrid(this.m_Level, this.m_Code);
        }

        private void bbiSave_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (this.SaveData())
            {
                XtraMessageBox.Show("Qu\x00e1 tr\x00ecnh lưu đ\x00e3 ho\x00e0n tất!");
            }
            else
            {
                XtraMessageBox.Show("Lưu thất bại!");
            }
        }

        private void bbiTimekeeperExtraPrivate_ItemClick(object sender, ItemClickEventArgs e)
        {
            new clsTimeKeeperOption { TimeKeeperTableDefault = 3 }.SaveOption();
            this.RaiseTimekeeperTableSelectedHandler(this.m_Code, this.m_TimeKeeperTableListID, this.m_Year, 2);
        }

        private void bbiTimekeeperTable_ItemClick(object sender, ItemClickEventArgs e)
        {
            new clsTimeKeeperOption { TimeKeeperTableDefault = 0 }.SaveOption();
            this.RaiseTimekeeperTableSelectedHandler(this.m_Code, this.m_TimeKeeperTableListID, this.m_Year, 0);
        }

        private void bbiTimekeeperTable1_ItemClick(object sender, ItemClickEventArgs e)
        {
            new clsTimeKeeperOption { TimeKeeperTableDefault = 1 }.SaveOption();
            this.RaiseTimekeeperTableSelectedHandler(this.m_Code, this.m_TimeKeeperTableListID, this.m_Year, 1);
        }

        private string DayName(int Year, int Month, int Day)
        {
            try
            {
                System.DateTime time = new System.DateTime(Year, Month, Day);
                return (Day.ToString() + " " + time.DayOfWeek.ToString().Substring(0, 3));
            }
            catch
            {
                return Day.ToString();
            }
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void gbList_CellMerge(object sender, CellMergeEventArgs e)
        {
            if (e.Column == this.gbList.Columns["TotalHour"])
            {
                string str = Convert.ToString(this.gbList.GetRowCellValue(e.RowHandle1, this.gbList.Columns["EmployeeCode"]));
                string str2 = Convert.ToString(this.gbList.GetRowCellValue(e.RowHandle2, this.gbList.Columns["EmployeeCode"]));
                e.Handled = true;
                if (str == str2)
                {
                    e.Merge = true;
                    e.Handled = false;
                }
            }
        }

        private void gbList_CellValueChanged(object sender, CellValueChangedEventArgs e)
        {
            if (e.Column != this.colTotalHour)
            {
                this.m_EmployeeCode = this.gbList.GetFocusedRowCellValue(this.colEmployeeCode).ToString();
                this.m_ShiftCode = this.gbList.GetFocusedRowCellValue(this.colShiftCode).ToString();
                if (!this.m_IsEditValueChanged)
                {
                    this.m_IsEditValueChanged = true;
                    this.SetRowCellValue(e.RowHandle, this.m_EmployeeCode);
                }
                else
                {
                    try
                    {
                        this.m_Hour = Convert.ToDouble(e.Value.ToString());
                    }
                    catch
                    {
                        this.m_Hour = 0.0;
                        this.gbList.SetFocusedValue(0);
                    }
                    if (this.m_Hour > 24.0)
                    {
                        XtraMessageBox.Show("Dữ liệu bạn nhập v\x00e0o qu\x00e1 lớn!");
                        this.m_Hour = 0.0;
                        this.gbList.SetFocusedValue(0);
                    }
                    if (this.m_Hour < 0.0)
                    {
                        this.m_Hour = 0.0;
                        this.gbList.SetFocusedValue(0);
                    }
                    this.m_Symbol = "+";
                    this.m_IsWork = HRM_TIMEKEEPER_SHIFT.IsWork(this.m_TimeKeeperTableListID, this.m_EmployeeCode, this.m_ShiftCode, this.m_Date.Day);
                    int minute = int.Parse((this.m_Hour * 60.0).ToString());
                    DIC_SHIFT dic_shift = new DIC_SHIFT();
                    dic_shift.Get(this.m_ShiftCode);
                    System.DateTime time = new System.DateTime(this.m_Date.Year, this.m_Date.Month, this.m_Date.Day, dic_shift.BeginTime.Hour, dic_shift.BeginTime.Minute, dic_shift.BeginTime.Second);
                    System.DateTime time2 = new System.DateTime(this.m_Date.Year, this.m_Date.Month, this.m_Date.Day, dic_shift.EndTime.Hour, dic_shift.EndTime.Minute, dic_shift.EndTime.Second);
                    this.m_TimeIn = time;
                    this.m_TimeOut = MyDateTime.AddMinute(this.m_TimeIn, minute);
                    HRM_TIMEKEEPER hrm_timekeeper = new HRM_TIMEKEEPER();
                    hrm_timekeeper.Get(this.m_TimeKeeperTableListID, this.m_EmployeeCode, this.m_ShiftCode, this.m_Symbol, this.m_Date, this.m_TimeIn, this.m_TimeOut);
                    this.m_TimeIn = hrm_timekeeper.TimeIn;
                    this.m_TimeOut = hrm_timekeeper.TimeOut;
                    this.m_Hour = hrm_timekeeper.Hour;
                    this.m_DayHour = hrm_timekeeper.DayHour;
                    this.m_NightHour = hrm_timekeeper.NightHour;
                    this.m_LateMinute = hrm_timekeeper.LateMinute;
                    this.m_EarlyMinute = hrm_timekeeper.EarlyMinute;
                    this.dt_Timekeeper.Rows.Add(new object[] { 
                        this.m_TimeKeeperTableListID, this.m_EmployeeCode, this.m_ShiftCode, this.m_Date, this.m_Symbol, this.m_TimeIn, this.m_TimeOut, this.m_Hour, this.m_DayHour, this.m_NightHour, 0, this.m_LateMinute, this.m_EarlyMinute, this.m_IsOvertime, this.m_IsWork, 0, 
                        ""
                     });
                    this.SaveData();
                    if (!this.m_IsSetRowCellValue)
                    {
                        this.m_IsSetRowCellValue = true;
                    }
                    else
                    {
                        this.SetRowCellValue(e.RowHandle, this.m_EmployeeCode);
                    }
                }
            }
        }

        private void gbList_CustomDrawRowIndicator(object sender, RowIndicatorCustomDrawEventArgs e)
        {
            if (e.RowHandle == -2147483648)
            {
                e.Handled = true;
                e.Painter.DrawObject(e.Info);
                Rectangle bounds = e.Bounds;
                e.Graphics.FillRectangle(new SolidBrush(Color.FromArgb(0x3f, 0xa5, 0xa5, 0)), bounds);
                bounds.Height--;
                bounds.Width--;
                e.Graphics.DrawRectangle(Pens.Blue, bounds);
            }
            int rowHandle = e.RowHandle;
            if (rowHandle >= 0)
            {
                rowHandle++;
                e.Info.DisplayText = rowHandle.ToString();
            }
        }

        private void gbList_CustomSummaryCalculate(object sender, CustomSummaryEventArgs e)
        {
            int num = Convert.ToInt32((e.Item as GridSummaryItem).Tag);
            if (e.SummaryProcess == CustomSummaryProcess.Start)
            {
                this.x_OEmployeeCode = "";
                this.x_TotalHour = 0.0;
            }
            if (e.SummaryProcess == CustomSummaryProcess.Calculate)
            {
                string str = this.gbList.GetRowCellValue(e.RowHandle, "EmployeeCode").ToString();
                if (str != this.x_OEmployeeCode)
                {
                    int num2 = num;
                    if (num2 == 0)
                    {
                        this.x_TotalHour += Convert.ToDouble(e.FieldValue);
                    }
                }
                this.x_OEmployeeCode = str;
            }
            if (e.SummaryProcess == CustomSummaryProcess.Finalize)
            {
                switch (num)
                {
                    case 0:
                    {
                        e.TotalValue = this.x_TotalHour;
                        break;
                    }
                }
            }
        }

        private void gbList_FocusedColumnChanged(object sender, FocusedColumnChangedEventArgs e)
        {
            try
            {
                int day = 0;
                switch (e.FocusedColumn.Name)
                {
                    case "colDay1":
                        day = 1;
                        break;

                    case "colDay2":
                        day = 2;
                        break;

                    case "colDay3":
                        day = 3;
                        break;

                    case "colDay4":
                        day = 4;
                        break;

                    case "colDay5":
                        day = 5;
                        break;

                    case "colDay6":
                        day = 6;
                        break;

                    case "colDay7":
                        day = 7;
                        break;

                    case "colDay8":
                        day = 8;
                        break;

                    case "colDay9":
                        day = 9;
                        break;

                    case "colDay10":
                        day = 10;
                        break;

                    case "colDay11":
                        day = 11;
                        break;

                    case "colDay12":
                        day = 12;
                        break;

                    case "colDay13":
                        day = 13;
                        break;

                    case "colDay14":
                        day = 14;
                        break;

                    case "colDay15":
                        day = 15;
                        break;

                    case "colDay16":
                        day = 0x10;
                        break;

                    case "colDay17":
                        day = 0x11;
                        break;

                    case "colDay18":
                        day = 0x12;
                        break;

                    case "colDay19":
                        day = 0x13;
                        break;

                    case "colDay20":
                        day = 20;
                        break;

                    case "colDay21":
                        day = 0x15;
                        break;

                    case "colDay22":
                        day = 0x16;
                        break;

                    case "colDay23":
                        day = 0x17;
                        break;

                    case "colDay24":
                        day = 0x18;
                        break;

                    case "colDay25":
                        day = 0x19;
                        break;

                    case "colDay26":
                        day = 0x1a;
                        break;

                    case "colDay27":
                        day = 0x1b;
                        break;

                    case "colDay28":
                        day = 0x1c;
                        break;

                    case "colDay29":
                        day = 0x1d;
                        break;

                    case "colDay30":
                        day = 30;
                        break;

                    case "colDay31":
                        day = 0x1f;
                        break;
                }
                this.m_Date = new System.DateTime(this.m_Year, this.m_Month, day);
                this.m_OldHour = double.Parse(this.gbList.GetFocusedValue().ToString());
            }
            catch
            {
            }
        }

        private void gbList_FocusedRowChanged(object sender, FocusedRowChangedEventArgs e)
        {
            try
            {
                this.m_OldHour = double.Parse(this.gbList.GetFocusedValue().ToString());
            }
            catch
            {
            }
        }

        private void gbList_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                base.DoShowMenu(this.gbList.CalcHitInfo(new Point(e.X, e.Y)), this.gbList, this);
            }
        }

        private void GridViewLock()
        {
            int numberDay = System.DateTime.DaysInMonth(this.m_Year, this.m_Month);
            this.ShowHideColumn(numberDay);
            for (int i = 1; i <= numberDay; i++)
            {
                this.gbList.Columns[i + 7].OptionsColumn.ReadOnly = true;
                this.gbList.Columns[i + 7].OptionsColumn.AllowEdit = false;
                System.DateTime date = new System.DateTime(this.m_Year, this.m_Month, i);
                clsTimeKeeperOption option = new clsTimeKeeperOption();
                if (date.DayOfWeek.ToString() == "Monday")
                {
                    this.gbList.Columns[i + 7].AppearanceCell.BackColor = option.MondayColor;
                }
                else if (date.DayOfWeek.ToString() == "Tuesday")
                {
                    this.gbList.Columns[i + 7].AppearanceCell.BackColor = option.TuesdayColor;
                }
                else if (date.DayOfWeek.ToString() == "Wednesday")
                {
                    this.gbList.Columns[i + 7].AppearanceCell.BackColor = option.WednesdayColor;
                }
                else if (date.DayOfWeek.ToString() == "Thursday")
                {
                    this.gbList.Columns[i + 7].AppearanceCell.BackColor = option.ThursdayColor;
                }
                else if (date.DayOfWeek.ToString() == "Friday")
                {
                    this.gbList.Columns[i + 7].AppearanceCell.BackColor = option.FridayColor;
                }
                else if (date.DayOfWeek.ToString() == "Saturday")
                {
                    this.gbList.Columns[i + 7].AppearanceCell.BackColor = option.SaturdayColor;
                }
                else if (date.DayOfWeek.ToString() == "Sunday")
                {
                    this.gbList.Columns[i + 7].AppearanceCell.BackColor = option.SundayColor;
                }
                DIC_HOLIDAY dic_holiday = new DIC_HOLIDAY();
                if (dic_holiday.Exist(date))
                {
                    this.gbList.Columns[i + 7].AppearanceCell.BackColor = option.HolidayColor;
                }
                this.gbList.Columns[i + 7].Caption = this.DayName(this.m_Year, this.m_Month, i);
            }
        }

        private void GridViewOpen()
        {
            int numberDay = System.DateTime.DaysInMonth(this.m_Year, this.m_Month);
            this.ShowHideColumn(numberDay);
            for (int i = 1; i <= numberDay; i++)
            {
                this.gbList.Columns[i + 7].OptionsColumn.ReadOnly = false;
                this.gbList.Columns[i + 7].OptionsColumn.AllowEdit = true;
                System.DateTime date = new System.DateTime(this.m_Year, this.m_Month, i);
                clsTimeKeeperOption option = new clsTimeKeeperOption();
                if (date.DayOfWeek.ToString() == "Monday")
                {
                    this.gbList.Columns[i + 7].AppearanceCell.BackColor = option.MondayColor;
                }
                else if (date.DayOfWeek.ToString() == "Tuesday")
                {
                    this.gbList.Columns[i + 7].AppearanceCell.BackColor = option.TuesdayColor;
                }
                else if (date.DayOfWeek.ToString() == "Wednesday")
                {
                    this.gbList.Columns[i + 7].AppearanceCell.BackColor = option.WednesdayColor;
                }
                else if (date.DayOfWeek.ToString() == "Thursday")
                {
                    this.gbList.Columns[i + 7].AppearanceCell.BackColor = option.ThursdayColor;
                }
                else if (date.DayOfWeek.ToString() == "Friday")
                {
                    this.gbList.Columns[i + 7].AppearanceCell.BackColor = option.FridayColor;
                }
                else if (date.DayOfWeek.ToString() == "Saturday")
                {
                    this.gbList.Columns[i + 7].AppearanceCell.BackColor = option.SaturdayColor;
                }
                else if (date.DayOfWeek.ToString() == "Sunday")
                {
                    this.gbList.Columns[i + 7].AppearanceCell.BackColor = option.SundayColor;
                }
                DIC_HOLIDAY dic_holiday = new DIC_HOLIDAY();
                if (dic_holiday.Exist(date))
                {
                    this.gbList.Columns[i + 7].AppearanceCell.BackColor = option.HolidayColor;
                }
                this.gbList.Columns[i + 7].Caption = this.DayName(this.m_Year, this.m_Month, i);
            }
        }

        private void Init()
        {
            //if (MyInfo.Get(MyEncryption.Encrypt("ERP01", "123654", true)) == "OK")
            {
                this.lbCompanyName.Text = this.m_CompanyName = "";// MyInfo.Company;
            }
            this.lbBranchName.Text = "";
            this.lbDepartmentName.Text = "";
            this.lbGroupName.Text = "";
            this.bbeYear.EditValue = this.clsAllOption.MonthDefault;
            this.m_Year = this.clsAllOption.MonthDefault.Year;
            this.xucOrganization1.LoadData();
            this.xucOrganization1.Selected += delegate (object s, HRM.CORE.Organization o) {
                HRM_GROUP hrm_group = new HRM_GROUP();
                HRM_DEPARTMENT hrm_department = new HRM_DEPARTMENT();
                HRM_BRANCH hrm_branch = new HRM_BRANCH();
                if (o.Level == 0)
                {
                    this.LoadGrid(this.m_Level = 0, this.m_Code = "");
                    this.lbCompanyName.Text = this.m_CompanyName;
                    this.lbBranchName.Text = "";
                    this.lbDepartmentName.Text = "";
                    this.lbGroupName.Text = "";
                }
                else if (o.Level == 1)
                {
                    this.LoadGrid(this.m_Level = 1, this.m_Code = o.BranchCode);
                    hrm_branch.Get(o.BranchCode);
                    this.lbCompanyName.Text = "";
                    this.lbBranchName.Text = hrm_branch.BranchName;
                    this.lbDepartmentName.Text = "";
                    this.lbGroupName.Text = "";
                }
                else if (o.Level == 2)
                {
                    this.LoadGrid(this.m_Level = 2, this.m_Code = o.DepartmentCode);
                    hrm_department.Get(o.DepartmentCode);
                    this.lbCompanyName.Text = "";
                    this.lbBranchName.Text = hrm_department.BranchName;
                    this.lbDepartmentName.Text = hrm_department.DepartmentName;
                    this.lbGroupName.Text = "";
                }
                else if (o.Level == 3)
                {
                    this.LoadGrid(this.m_Level = 3, this.m_Code = o.GroupCode);
                    hrm_group.Get(o.GroupCode);
                    hrm_department.Get(hrm_group.DepartmentCode);
                    this.lbCompanyName.Text = "";
                    this.lbBranchName.Text = hrm_department.BranchName;
                    this.lbDepartmentName.Text = hrm_department.DepartmentName;
                    this.lbGroupName.Text = "/ " + hrm_group.GroupName;
                }
            };
            this.xucOrganization1.Updated += o => this.xucOrganization1.LoadData();
            this.dt_Timekeeper = new HRM_TIMEKEEPER().CreateNullDataTable();
            new HRM_TIMEKEEPER_TABLELIST().AddRepositoryGridLookupEditByYear(this.repTimeKeeperList, this.m_Year);
            this.repTimeKeeperList.ButtonClick += new ButtonPressedEventHandler(this.repTimeKeeperList_ButtonClick);
            this.repPopup.PopupControl = this.ppContainerControl;
            this.ppContainerControl.Width = this.xucTimekeepingAdd.Width;
            this.ppContainerControl.Height = this.xucTimekeepingAdd.Height;
            this.ppContainerControl.Controls.Add(this.xucTimekeepingAdd);
            this.xucTimekeepingAdd.Status = Actions.Update;
            this.xucTimekeepingAdd.CancelClick += s => this.ppContainerControl.OwnerEdit.ClosePopup();
            this.xucTimekeepingAdd.Success += delegate (object s, HRM_TIMEKEEPER i) {
                this.m_IsEditValueChanged = false;
                this.gbList.SetFocusedValue(i.Hour);
                try
                {
                    this.ppContainerControl.OwnerEdit.ClosePopup();
                }
                catch
                {
                }
            };
        }

        private void InitializeComponent()
        {
            this.components = new Container();
            ComponentResourceManager manager = new ComponentResourceManager(typeof(xucTimekeeperTableHour));
            SerializableAppearanceObject appearance = new SerializableAppearanceObject();
            MenuButton button = new MenuButton();
            ItemCommand command = new ItemCommand();
            ItemCommand command2 = new ItemCommand();
            ItemCommand command3 = new ItemCommand();
            ItemCommand command4 = new ItemCommand();
            ItemCommand command5 = new ItemCommand();
            ItemCommand command6 = new ItemCommand();
            ItemCommand command7 = new ItemCommand();
            ItemCommand command8 = new ItemCommand();
            ItemCommand command9 = new ItemCommand();
            ItemCommand command10 = new ItemCommand();
            ItemCommand command11 = new ItemCommand();
            ItemCommand command12 = new ItemCommand();
            ItemCommand command13 = new ItemCommand();
            ItemCommand command14 = new ItemCommand();
            ItemCommand command15 = new ItemCommand();
            ItemCommand command16 = new ItemCommand();
            ItemCommand command17 = new ItemCommand();
            ItemCommand command18 = new ItemCommand();
            ItemCommand command19 = new ItemCommand();
            ItemCommand command20 = new ItemCommand();
            ItemCommand command21 = new ItemCommand();
            ItemCommand command22 = new ItemCommand();
            ItemCommand command23 = new ItemCommand();
            ItemCommand command24 = new ItemCommand();
            ItemCommand command25 = new ItemCommand();
            ItemCommand command26 = new ItemCommand();
            ItemCommand command27 = new ItemCommand();
            ItemCommand command28 = new ItemCommand();
            ItemCommand command29 = new ItemCommand();
            StyleFormatCondition condition = new StyleFormatCondition();
            this.colShift = new GridColumn();
            this.colDay1 = new GridColumn();
            this.repPopup = new RepositoryItemPopupContainerEdit();
            this.repCal = new RepositoryItemCalcEdit();
            this.colDay2 = new GridColumn();
            this.colDay3 = new GridColumn();
            this.colDay4 = new GridColumn();
            this.colDay5 = new GridColumn();
            this.colDay6 = new GridColumn();
            this.colDay7 = new GridColumn();
            this.colDay8 = new GridColumn();
            this.colDay9 = new GridColumn();
            this.colDay10 = new GridColumn();
            this.colDay11 = new GridColumn();
            this.colDay12 = new GridColumn();
            this.colDay13 = new GridColumn();
            this.colDay14 = new GridColumn();
            this.colDay15 = new GridColumn();
            this.colDay16 = new GridColumn();
            this.colDay17 = new GridColumn();
            this.colDay18 = new GridColumn();
            this.colDay19 = new GridColumn();
            this.colDay20 = new GridColumn();
            this.colDay21 = new GridColumn();
            this.colDay22 = new GridColumn();
            this.colDay23 = new GridColumn();
            this.colDay24 = new GridColumn();
            this.colDay25 = new GridColumn();
            this.colDay26 = new GridColumn();
            this.colDay27 = new GridColumn();
            this.colDay28 = new GridColumn();
            this.colDay29 = new GridColumn();
            this.colDay30 = new GridColumn();
            this.colDay31 = new GridColumn();
            this.barManager1 = new BarManager(this.components);
            this.bar1 = new Bar();
            this.bbeTimeKeeperTableListName = new BarEditItem();
            this.repTimeKeeperList = new RepositoryItemGridLookUpEdit();
            this.repositoryItemGridLookUpEdit2View = new GridView();
            this.gridColumn1 = new GridColumn();
            this.bbeYear = new BarEditItem();
            this.repYear = new RepositoryItemTimeEdit();
            this.bbiPrint = new BarButtonItem();
            this.bbiSave = new BarButtonItem();
            this.bbiExport = new BarButtonItem();
            this.bbiLock = new BarButtonItem();
            this.bbiOpen = new BarButtonItem();
            this.bbiFinish = new BarButtonItem();
            this.bbiReload = new BarButtonItem();
            this.bbiClose = new BarButtonItem();
            this.barDockControlTop = new BarDockControl();
            this.barDockControlBottom = new BarDockControl();
            this.barDockControlLeft = new BarDockControl();
            this.barDockControlRight = new BarDockControl();
            this.dockManager1 = new DockManager(this.components);
            this.hideContainerLeft = new AutoHideContainer();
            this.dockPanel1 = new DockPanel();
            this.dockPanel1_Container = new ControlContainer();
            this.xucOrganization1 = new xucOrganization();
            this.imageCollection2 = new DevExpress.Utils.ImageCollection(this.components);
            this.barButtonItem3 = new BarButtonItem();
            this.bbiTimekeeperTable = new BarButtonItem();
            this.bbiTimekeeperTable1 = new BarButtonItem();
            this.bbiTimekeeperExtraPrivate = new BarButtonItem();
            this.gcList = new GridControl();
            this.gbList = new GridView();
            this.colEmployeeCode = new GridColumn();
            this.colFirstName = new GridColumn();
            this.colLastName = new GridColumn();
            this.colBranchName = new GridColumn();
            this.colDepartmentName = new GridColumn();
            this.colGroupName = new GridColumn();
            this.colShiftCode = new GridColumn();
            this.colTotalHour = new GridColumn();
            this.panelControl1 = new PanelControl();
            this.flowLayoutPanel3 = new FlowLayoutPanel();
            this.xucExpandCollapseButton1 = new xucExpandCollapseButton();
            this.lbGroupName = new LabelControl();
            this.lbDepartmentName = new LabelControl();
            this.flowLayoutPanel2 = new FlowLayoutPanel();
            this.lbBranchName = new LabelControl();
            this.lbCompanyName = new LabelControl();
            this.flowLayoutPanel1 = new FlowLayoutPanel();
            this.simpleButton1 = new SimpleButton();
            this.lbTimeKeeperOverTimeName = new LabelControl();
            this.ptLock = new PictureBox();
            this.ptFinish = new PictureBox();
            this.lbMessage = new LabelControl();
            this.popupMenu1 = new PopupMenu(this.components);
            this.repPopup.BeginInit();
            this.repCal.BeginInit();
            this.barManager1.BeginInit();
            this.repTimeKeeperList.BeginInit();
            this.repositoryItemGridLookUpEdit2View.BeginInit();
            this.repYear.BeginInit();
            this.dockManager1.BeginInit();
            this.hideContainerLeft.SuspendLayout();
            this.dockPanel1.SuspendLayout();
            this.dockPanel1_Container.SuspendLayout();
            this.imageCollection2.BeginInit();
            this.gcList.BeginInit();
            this.gbList.BeginInit();
            this.panelControl1.BeginInit();
            this.panelControl1.SuspendLayout();
            this.flowLayoutPanel3.SuspendLayout();
            this.flowLayoutPanel2.SuspendLayout();
            this.flowLayoutPanel1.SuspendLayout();
            ((ISupportInitialize) this.ptLock).BeginInit();
            ((ISupportInitialize) this.ptFinish).BeginInit();
            this.popupMenu1.BeginInit();
            base.SuspendLayout();
            this.colShift.AppearanceHeader.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.colShift.AppearanceHeader.Options.UseFont = true;
            this.colShift.Caption = "Ca";
            this.colShift.FieldName = "ShiftName";
            this.colShift.Fixed = FixedStyle.Left;
            this.colShift.Name = "colShift";
            this.colShift.OptionsColumn.AllowEdit = false;
            this.colShift.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colShift.OptionsColumn.ReadOnly = true;
            this.colShift.Visible = true;
            this.colShift.VisibleIndex = 3;
            this.colShift.Width = 0x30;
            this.colDay1.AppearanceCell.BackColor = SystemColors.Info;
            this.colDay1.AppearanceCell.Options.UseBackColor = true;
            this.colDay1.AppearanceCell.Options.UseTextOptions = true;
            this.colDay1.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colDay1.Caption = "1";
            this.colDay1.ColumnEdit = this.repPopup;
            this.colDay1.FieldName = "D1";
            this.colDay1.Name = "colDay1";
            this.colDay1.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay1.OptionsColumn.ReadOnly = true;
            this.colDay1.SummaryItem.DisplayFormat = "{0:##,##0}";
            this.colDay1.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colDay1.Visible = true;
            this.colDay1.VisibleIndex = 4;
            this.colDay1.Width = 0x23;
            this.repPopup.AutoHeight = false;
            this.repPopup.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.repPopup.Name = "repPopup";
            this.repPopup.PopupSizeable = false;
            this.repPopup.TextEditStyle = TextEditStyles.Standard;
            this.repPopup.Popup += new EventHandler(this.repPopup_Popup);
            this.repCal.AutoHeight = false;
            this.repCal.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.repCal.Name = "repCal";
            this.colDay2.AppearanceCell.BackColor = Color.SeaShell;
            this.colDay2.AppearanceCell.Options.UseBackColor = true;
            this.colDay2.AppearanceCell.Options.UseTextOptions = true;
            this.colDay2.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colDay2.Caption = "2";
            this.colDay2.ColumnEdit = this.repPopup;
            this.colDay2.FieldName = "D2";
            this.colDay2.Name = "colDay2";
            this.colDay2.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay2.OptionsColumn.ReadOnly = true;
            this.colDay2.SummaryItem.DisplayFormat = "{0:##,##0}";
            this.colDay2.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colDay2.Visible = true;
            this.colDay2.VisibleIndex = 5;
            this.colDay2.Width = 0x23;
            this.colDay3.AppearanceCell.BackColor = SystemColors.Info;
            this.colDay3.AppearanceCell.Options.UseBackColor = true;
            this.colDay3.AppearanceCell.Options.UseTextOptions = true;
            this.colDay3.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colDay3.Caption = "3";
            this.colDay3.ColumnEdit = this.repPopup;
            this.colDay3.FieldName = "D3";
            this.colDay3.Name = "colDay3";
            this.colDay3.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay3.OptionsColumn.ReadOnly = true;
            this.colDay3.SummaryItem.DisplayFormat = "{0:##,##0}";
            this.colDay3.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colDay3.Visible = true;
            this.colDay3.VisibleIndex = 6;
            this.colDay3.Width = 0x23;
            this.colDay4.AppearanceCell.BackColor = Color.SeaShell;
            this.colDay4.AppearanceCell.Options.UseBackColor = true;
            this.colDay4.AppearanceCell.Options.UseTextOptions = true;
            this.colDay4.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colDay4.Caption = "4";
            this.colDay4.ColumnEdit = this.repPopup;
            this.colDay4.FieldName = "D4";
            this.colDay4.Name = "colDay4";
            this.colDay4.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay4.OptionsColumn.ReadOnly = true;
            this.colDay4.SummaryItem.DisplayFormat = "{0:##,##0}";
            this.colDay4.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colDay4.Visible = true;
            this.colDay4.VisibleIndex = 7;
            this.colDay4.Width = 0x23;
            this.colDay5.AppearanceCell.BackColor = SystemColors.Info;
            this.colDay5.AppearanceCell.Options.UseBackColor = true;
            this.colDay5.AppearanceCell.Options.UseTextOptions = true;
            this.colDay5.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colDay5.Caption = "5";
            this.colDay5.ColumnEdit = this.repPopup;
            this.colDay5.FieldName = "D5";
            this.colDay5.Name = "colDay5";
            this.colDay5.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay5.OptionsColumn.ReadOnly = true;
            this.colDay5.SummaryItem.DisplayFormat = "{0:##,##0}";
            this.colDay5.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colDay5.Visible = true;
            this.colDay5.VisibleIndex = 8;
            this.colDay5.Width = 0x23;
            this.colDay6.AppearanceCell.BackColor = Color.SeaShell;
            this.colDay6.AppearanceCell.Options.UseBackColor = true;
            this.colDay6.AppearanceCell.Options.UseTextOptions = true;
            this.colDay6.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colDay6.Caption = "6";
            this.colDay6.ColumnEdit = this.repPopup;
            this.colDay6.FieldName = "D6";
            this.colDay6.Name = "colDay6";
            this.colDay6.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay6.OptionsColumn.ReadOnly = true;
            this.colDay6.SummaryItem.DisplayFormat = "{0:##,##0}";
            this.colDay6.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colDay6.Visible = true;
            this.colDay6.VisibleIndex = 9;
            this.colDay6.Width = 0x23;
            this.colDay7.AppearanceCell.BackColor = SystemColors.Info;
            this.colDay7.AppearanceCell.Options.UseBackColor = true;
            this.colDay7.AppearanceCell.Options.UseTextOptions = true;
            this.colDay7.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colDay7.Caption = "7";
            this.colDay7.ColumnEdit = this.repPopup;
            this.colDay7.FieldName = "D7";
            this.colDay7.Name = "colDay7";
            this.colDay7.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay7.OptionsColumn.ReadOnly = true;
            this.colDay7.SummaryItem.DisplayFormat = "{0:##,##0}";
            this.colDay7.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colDay7.Visible = true;
            this.colDay7.VisibleIndex = 10;
            this.colDay7.Width = 0x23;
            this.colDay8.AppearanceCell.BackColor = Color.SeaShell;
            this.colDay8.AppearanceCell.Options.UseBackColor = true;
            this.colDay8.AppearanceCell.Options.UseTextOptions = true;
            this.colDay8.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colDay8.Caption = "8";
            this.colDay8.ColumnEdit = this.repPopup;
            this.colDay8.FieldName = "D8";
            this.colDay8.Name = "colDay8";
            this.colDay8.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay8.OptionsColumn.ReadOnly = true;
            this.colDay8.SummaryItem.DisplayFormat = "{0:##,##0}";
            this.colDay8.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colDay8.Visible = true;
            this.colDay8.VisibleIndex = 11;
            this.colDay8.Width = 0x23;
            this.colDay9.AppearanceCell.BackColor = SystemColors.Info;
            this.colDay9.AppearanceCell.Options.UseBackColor = true;
            this.colDay9.AppearanceCell.Options.UseTextOptions = true;
            this.colDay9.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colDay9.Caption = "9";
            this.colDay9.ColumnEdit = this.repPopup;
            this.colDay9.FieldName = "D9";
            this.colDay9.Name = "colDay9";
            this.colDay9.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay9.OptionsColumn.ReadOnly = true;
            this.colDay9.SummaryItem.DisplayFormat = "{0:##,##0}";
            this.colDay9.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colDay9.Visible = true;
            this.colDay9.VisibleIndex = 12;
            this.colDay9.Width = 0x23;
            this.colDay10.AppearanceCell.BackColor = Color.SeaShell;
            this.colDay10.AppearanceCell.Options.UseBackColor = true;
            this.colDay10.AppearanceCell.Options.UseTextOptions = true;
            this.colDay10.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colDay10.Caption = "10";
            this.colDay10.ColumnEdit = this.repPopup;
            this.colDay10.FieldName = "D10";
            this.colDay10.Name = "colDay10";
            this.colDay10.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay10.OptionsColumn.ReadOnly = true;
            this.colDay10.SummaryItem.DisplayFormat = "{0:##,##0}";
            this.colDay10.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colDay10.Visible = true;
            this.colDay10.VisibleIndex = 13;
            this.colDay10.Width = 0x23;
            this.colDay11.AppearanceCell.BackColor = SystemColors.Info;
            this.colDay11.AppearanceCell.Options.UseBackColor = true;
            this.colDay11.AppearanceCell.Options.UseTextOptions = true;
            this.colDay11.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colDay11.Caption = "11";
            this.colDay11.ColumnEdit = this.repPopup;
            this.colDay11.FieldName = "D11";
            this.colDay11.Name = "colDay11";
            this.colDay11.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay11.OptionsColumn.ReadOnly = true;
            this.colDay11.SummaryItem.DisplayFormat = "{0:##,##0}";
            this.colDay11.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colDay11.Visible = true;
            this.colDay11.VisibleIndex = 14;
            this.colDay11.Width = 0x23;
            this.colDay12.AppearanceCell.BackColor = Color.SeaShell;
            this.colDay12.AppearanceCell.Options.UseBackColor = true;
            this.colDay12.AppearanceCell.Options.UseTextOptions = true;
            this.colDay12.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colDay12.Caption = "12";
            this.colDay12.ColumnEdit = this.repPopup;
            this.colDay12.FieldName = "D12";
            this.colDay12.Name = "colDay12";
            this.colDay12.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay12.OptionsColumn.ReadOnly = true;
            this.colDay12.SummaryItem.DisplayFormat = "{0:##,##0}";
            this.colDay12.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colDay12.Visible = true;
            this.colDay12.VisibleIndex = 15;
            this.colDay12.Width = 0x23;
            this.colDay13.AppearanceCell.BackColor = SystemColors.Info;
            this.colDay13.AppearanceCell.Options.UseBackColor = true;
            this.colDay13.AppearanceCell.Options.UseTextOptions = true;
            this.colDay13.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colDay13.Caption = "13";
            this.colDay13.ColumnEdit = this.repPopup;
            this.colDay13.FieldName = "D13";
            this.colDay13.Name = "colDay13";
            this.colDay13.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay13.OptionsColumn.ReadOnly = true;
            this.colDay13.SummaryItem.DisplayFormat = "{0:##,##0}";
            this.colDay13.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colDay13.Visible = true;
            this.colDay13.VisibleIndex = 0x10;
            this.colDay13.Width = 0x23;
            this.colDay14.AppearanceCell.BackColor = Color.SeaShell;
            this.colDay14.AppearanceCell.Options.UseBackColor = true;
            this.colDay14.AppearanceCell.Options.UseTextOptions = true;
            this.colDay14.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colDay14.Caption = "14";
            this.colDay14.ColumnEdit = this.repPopup;
            this.colDay14.FieldName = "D14";
            this.colDay14.Name = "colDay14";
            this.colDay14.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay14.OptionsColumn.ReadOnly = true;
            this.colDay14.SummaryItem.DisplayFormat = "{0:##,##0}";
            this.colDay14.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colDay14.Visible = true;
            this.colDay14.VisibleIndex = 0x11;
            this.colDay14.Width = 0x23;
            this.colDay15.AppearanceCell.BackColor = SystemColors.Info;
            this.colDay15.AppearanceCell.Options.UseBackColor = true;
            this.colDay15.AppearanceCell.Options.UseTextOptions = true;
            this.colDay15.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colDay15.Caption = "15";
            this.colDay15.ColumnEdit = this.repPopup;
            this.colDay15.FieldName = "D15";
            this.colDay15.Name = "colDay15";
            this.colDay15.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay15.OptionsColumn.ReadOnly = true;
            this.colDay15.SummaryItem.DisplayFormat = "{0:##,##0}";
            this.colDay15.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colDay15.Visible = true;
            this.colDay15.VisibleIndex = 0x12;
            this.colDay15.Width = 0x23;
            this.colDay16.AppearanceCell.BackColor = Color.SeaShell;
            this.colDay16.AppearanceCell.Options.UseBackColor = true;
            this.colDay16.AppearanceCell.Options.UseTextOptions = true;
            this.colDay16.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colDay16.Caption = "16";
            this.colDay16.ColumnEdit = this.repPopup;
            this.colDay16.FieldName = "D16";
            this.colDay16.Name = "colDay16";
            this.colDay16.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay16.OptionsColumn.ReadOnly = true;
            this.colDay16.SummaryItem.DisplayFormat = "{0:##,##0}";
            this.colDay16.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colDay16.Visible = true;
            this.colDay16.VisibleIndex = 0x13;
            this.colDay16.Width = 0x23;
            this.colDay17.AppearanceCell.BackColor = SystemColors.Info;
            this.colDay17.AppearanceCell.Options.UseBackColor = true;
            this.colDay17.AppearanceCell.Options.UseTextOptions = true;
            this.colDay17.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colDay17.Caption = "17";
            this.colDay17.ColumnEdit = this.repPopup;
            this.colDay17.FieldName = "D17";
            this.colDay17.Name = "colDay17";
            this.colDay17.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay17.OptionsColumn.ReadOnly = true;
            this.colDay17.SummaryItem.DisplayFormat = "{0:##,##0}";
            this.colDay17.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colDay17.Visible = true;
            this.colDay17.VisibleIndex = 20;
            this.colDay17.Width = 0x23;
            this.colDay18.AppearanceCell.BackColor = Color.SeaShell;
            this.colDay18.AppearanceCell.Options.UseBackColor = true;
            this.colDay18.AppearanceCell.Options.UseTextOptions = true;
            this.colDay18.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colDay18.Caption = "18";
            this.colDay18.ColumnEdit = this.repPopup;
            this.colDay18.FieldName = "D18";
            this.colDay18.Name = "colDay18";
            this.colDay18.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay18.OptionsColumn.ReadOnly = true;
            this.colDay18.SummaryItem.DisplayFormat = "{0:##,##0}";
            this.colDay18.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colDay18.Visible = true;
            this.colDay18.VisibleIndex = 0x15;
            this.colDay18.Width = 0x23;
            this.colDay19.AppearanceCell.BackColor = SystemColors.Info;
            this.colDay19.AppearanceCell.Options.UseBackColor = true;
            this.colDay19.AppearanceCell.Options.UseTextOptions = true;
            this.colDay19.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colDay19.Caption = "19";
            this.colDay19.ColumnEdit = this.repPopup;
            this.colDay19.FieldName = "D19";
            this.colDay19.Name = "colDay19";
            this.colDay19.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay19.OptionsColumn.ReadOnly = true;
            this.colDay19.SummaryItem.DisplayFormat = "{0:##,##0}";
            this.colDay19.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colDay19.Visible = true;
            this.colDay19.VisibleIndex = 0x16;
            this.colDay19.Width = 0x23;
            this.colDay20.AppearanceCell.BackColor = Color.SeaShell;
            this.colDay20.AppearanceCell.Options.UseBackColor = true;
            this.colDay20.AppearanceCell.Options.UseTextOptions = true;
            this.colDay20.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colDay20.Caption = "20";
            this.colDay20.ColumnEdit = this.repPopup;
            this.colDay20.FieldName = "D20";
            this.colDay20.Name = "colDay20";
            this.colDay20.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay20.OptionsColumn.ReadOnly = true;
            this.colDay20.SummaryItem.DisplayFormat = "{0:##,##0}";
            this.colDay20.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colDay20.Visible = true;
            this.colDay20.VisibleIndex = 0x17;
            this.colDay20.Width = 0x23;
            this.colDay21.AppearanceCell.BackColor = SystemColors.Info;
            this.colDay21.AppearanceCell.Options.UseBackColor = true;
            this.colDay21.AppearanceCell.Options.UseTextOptions = true;
            this.colDay21.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colDay21.Caption = "21";
            this.colDay21.ColumnEdit = this.repPopup;
            this.colDay21.FieldName = "D21";
            this.colDay21.Name = "colDay21";
            this.colDay21.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay21.OptionsColumn.ReadOnly = true;
            this.colDay21.SummaryItem.DisplayFormat = "{0:##,##0}";
            this.colDay21.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colDay21.Visible = true;
            this.colDay21.VisibleIndex = 0x18;
            this.colDay21.Width = 0x23;
            this.colDay22.AppearanceCell.BackColor = Color.SeaShell;
            this.colDay22.AppearanceCell.Options.UseBackColor = true;
            this.colDay22.AppearanceCell.Options.UseTextOptions = true;
            this.colDay22.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colDay22.Caption = "22";
            this.colDay22.ColumnEdit = this.repPopup;
            this.colDay22.FieldName = "D22";
            this.colDay22.Name = "colDay22";
            this.colDay22.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay22.OptionsColumn.ReadOnly = true;
            this.colDay22.SummaryItem.DisplayFormat = "{0:##,##0}";
            this.colDay22.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colDay22.Visible = true;
            this.colDay22.VisibleIndex = 0x19;
            this.colDay22.Width = 0x23;
            this.colDay23.AppearanceCell.BackColor = SystemColors.Info;
            this.colDay23.AppearanceCell.Options.UseBackColor = true;
            this.colDay23.AppearanceCell.Options.UseTextOptions = true;
            this.colDay23.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colDay23.Caption = "23";
            this.colDay23.ColumnEdit = this.repPopup;
            this.colDay23.FieldName = "D23";
            this.colDay23.Name = "colDay23";
            this.colDay23.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay23.OptionsColumn.ReadOnly = true;
            this.colDay23.SummaryItem.DisplayFormat = "{0:##,##0}";
            this.colDay23.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colDay23.Visible = true;
            this.colDay23.VisibleIndex = 0x1a;
            this.colDay23.Width = 0x23;
            this.colDay24.AppearanceCell.BackColor = Color.SeaShell;
            this.colDay24.AppearanceCell.Options.UseBackColor = true;
            this.colDay24.AppearanceCell.Options.UseTextOptions = true;
            this.colDay24.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colDay24.Caption = "24";
            this.colDay24.ColumnEdit = this.repPopup;
            this.colDay24.FieldName = "D24";
            this.colDay24.Name = "colDay24";
            this.colDay24.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay24.OptionsColumn.ReadOnly = true;
            this.colDay24.SummaryItem.DisplayFormat = "{0:##,##0}";
            this.colDay24.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colDay24.Visible = true;
            this.colDay24.VisibleIndex = 0x1b;
            this.colDay24.Width = 0x23;
            this.colDay25.AppearanceCell.BackColor = SystemColors.Info;
            this.colDay25.AppearanceCell.Options.UseBackColor = true;
            this.colDay25.AppearanceCell.Options.UseTextOptions = true;
            this.colDay25.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colDay25.Caption = "25";
            this.colDay25.ColumnEdit = this.repPopup;
            this.colDay25.FieldName = "D25";
            this.colDay25.Name = "colDay25";
            this.colDay25.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay25.OptionsColumn.ReadOnly = true;
            this.colDay25.SummaryItem.DisplayFormat = "{0:##,##0}";
            this.colDay25.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colDay25.Visible = true;
            this.colDay25.VisibleIndex = 0x1c;
            this.colDay25.Width = 0x23;
            this.colDay26.AppearanceCell.BackColor = Color.SeaShell;
            this.colDay26.AppearanceCell.Options.UseBackColor = true;
            this.colDay26.AppearanceCell.Options.UseTextOptions = true;
            this.colDay26.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colDay26.Caption = "26";
            this.colDay26.ColumnEdit = this.repPopup;
            this.colDay26.FieldName = "D26";
            this.colDay26.Name = "colDay26";
            this.colDay26.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay26.OptionsColumn.ReadOnly = true;
            this.colDay26.SummaryItem.DisplayFormat = "{0:##,##0}";
            this.colDay26.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colDay26.Visible = true;
            this.colDay26.VisibleIndex = 0x1d;
            this.colDay26.Width = 0x23;
            this.colDay27.AppearanceCell.BackColor = SystemColors.Info;
            this.colDay27.AppearanceCell.Options.UseBackColor = true;
            this.colDay27.AppearanceCell.Options.UseTextOptions = true;
            this.colDay27.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colDay27.Caption = "27";
            this.colDay27.ColumnEdit = this.repPopup;
            this.colDay27.FieldName = "D27";
            this.colDay27.Name = "colDay27";
            this.colDay27.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay27.OptionsColumn.ReadOnly = true;
            this.colDay27.SummaryItem.DisplayFormat = "{0:##,##0}";
            this.colDay27.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colDay27.Visible = true;
            this.colDay27.VisibleIndex = 30;
            this.colDay27.Width = 0x23;
            this.colDay28.AppearanceCell.BackColor = Color.SeaShell;
            this.colDay28.AppearanceCell.Options.UseBackColor = true;
            this.colDay28.AppearanceCell.Options.UseTextOptions = true;
            this.colDay28.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colDay28.Caption = "28";
            this.colDay28.ColumnEdit = this.repPopup;
            this.colDay28.FieldName = "D28";
            this.colDay28.Name = "colDay28";
            this.colDay28.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay28.OptionsColumn.ReadOnly = true;
            this.colDay28.SummaryItem.DisplayFormat = "{0:##,##0}";
            this.colDay28.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colDay28.Visible = true;
            this.colDay28.VisibleIndex = 0x1f;
            this.colDay28.Width = 0x23;
            this.colDay29.AppearanceCell.BackColor = SystemColors.Info;
            this.colDay29.AppearanceCell.Options.UseBackColor = true;
            this.colDay29.AppearanceCell.Options.UseTextOptions = true;
            this.colDay29.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colDay29.Caption = "29";
            this.colDay29.ColumnEdit = this.repPopup;
            this.colDay29.FieldName = "D29";
            this.colDay29.Name = "colDay29";
            this.colDay29.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay29.OptionsColumn.ReadOnly = true;
            this.colDay29.SummaryItem.DisplayFormat = "{0:##,##0}";
            this.colDay29.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colDay29.Visible = true;
            this.colDay29.VisibleIndex = 0x20;
            this.colDay29.Width = 0x23;
            this.colDay30.AppearanceCell.BackColor = Color.SeaShell;
            this.colDay30.AppearanceCell.Options.UseBackColor = true;
            this.colDay30.AppearanceCell.Options.UseTextOptions = true;
            this.colDay30.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colDay30.Caption = "30";
            this.colDay30.ColumnEdit = this.repPopup;
            this.colDay30.FieldName = "D30";
            this.colDay30.Name = "colDay30";
            this.colDay30.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay30.OptionsColumn.ReadOnly = true;
            this.colDay30.SummaryItem.DisplayFormat = "{0:##,##0}";
            this.colDay30.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colDay30.Visible = true;
            this.colDay30.VisibleIndex = 0x21;
            this.colDay30.Width = 0x23;
            this.colDay31.AppearanceCell.BackColor = SystemColors.Info;
            this.colDay31.AppearanceCell.Options.UseBackColor = true;
            this.colDay31.AppearanceCell.Options.UseTextOptions = true;
            this.colDay31.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;
            this.colDay31.Caption = "31";
            this.colDay31.ColumnEdit = this.repPopup;
            this.colDay31.FieldName = "D31";
            this.colDay31.Name = "colDay31";
            this.colDay31.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDay31.OptionsColumn.ReadOnly = true;
            this.colDay31.SummaryItem.DisplayFormat = "{0:##,##0}";
            this.colDay31.SummaryItem.SummaryType = SummaryItemType.Sum;
            this.colDay31.Visible = true;
            this.colDay31.VisibleIndex = 0x22;
            this.colDay31.Width = 0x23;
            this.barManager1.Bars.AddRange(new Bar[] { this.bar1 });
            this.barManager1.DockControls.Add(this.barDockControlTop);
            this.barManager1.DockControls.Add(this.barDockControlBottom);
            this.barManager1.DockControls.Add(this.barDockControlLeft);
            this.barManager1.DockControls.Add(this.barDockControlRight);
            this.barManager1.DockManager = this.dockManager1;
            this.barManager1.Form = this;
            this.barManager1.Images = this.imageCollection2;
            this.barManager1.Items.AddRange(new BarItem[] { this.bbiExport, this.bbiPrint, this.barButtonItem3, this.bbiReload, this.bbiFinish, this.bbeTimeKeeperTableListName, this.bbiClose, this.bbiLock, this.bbiOpen, this.bbeYear, this.bbiSave, this.bbiTimekeeperTable, this.bbiTimekeeperTable1, this.bbiTimekeeperExtraPrivate });
            this.barManager1.MaxItemId = 0x15;
            this.barManager1.RepositoryItems.AddRange(new RepositoryItem[] { this.repTimeKeeperList, this.repYear });
            this.bar1.BarName = "Tools";
            this.bar1.DockCol = 0;
            this.bar1.DockRow = 0;
            this.bar1.DockStyle = BarDockStyle.Top;
            this.bar1.LinksPersistInfo.AddRange(new LinkPersistInfo[] { new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbeTimeKeeperTableListName, "", true, true, true, 0, null, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbeYear, "", true, true, true, 0, null, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiPrint, "", true, true, true, 0, null, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiSave, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiExport, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiLock, "", true, true, true, 0, null, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiOpen, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiFinish, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiReload, "", true, true, true, 0, null, BarItemPaintStyle.CaptionGlyph), new LinkPersistInfo(BarLinkUserDefines.PaintStyle, this.bbiClose, BarItemPaintStyle.CaptionGlyph) });
            this.bar1.OptionsBar.UseWholeRow = true;
            this.bar1.Text = "Tools";
            this.bbeTimeKeeperTableListName.Caption = "T\x00ean bảng chấm c\x00f4ng:";
            this.bbeTimeKeeperTableListName.Edit = this.repTimeKeeperList;
            this.bbeTimeKeeperTableListName.Id = 12;
            this.bbeTimeKeeperTableListName.Name = "bbeTimeKeeperTableListName";
            this.bbeTimeKeeperTableListName.Width = 160;
            this.bbeTimeKeeperTableListName.EditValueChanged += new EventHandler(this.bbeTimeKeeperTableListName_EditValueChanged);
            this.repTimeKeeperList.Appearance.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.repTimeKeeperList.Appearance.Options.UseFont = true;
            this.repTimeKeeperList.AutoHeight = false;
            this.repTimeKeeperList.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo), new EditorButton(ButtonPredefines.Glyph, "", -1, true, true, false, ImageLocation.MiddleCenter, (Image) manager.GetObject("repTimeKeeperList.Buttons"), new KeyShortcut(Keys.None), appearance, "", null, null, true) });
            this.repTimeKeeperList.Name = "repTimeKeeperList";
            this.repTimeKeeperList.NullText = "[Chọn bảng chấm c\x00f4ng]";
            this.repTimeKeeperList.View = this.repositoryItemGridLookUpEdit2View;
            this.repTimeKeeperList.EditValueChanging += new ChangingEventHandler(this.repTimeKeeperList_EditValueChanging);
            this.repTimeKeeperList.EditValueChanged += new EventHandler(this.repTimeKeeperList_EditValueChanged);
            this.repositoryItemGridLookUpEdit2View.Columns.AddRange(new GridColumn[] { this.gridColumn1 });
            this.repositoryItemGridLookUpEdit2View.FocusRectStyle = DrawFocusRectStyle.RowFocus;
            this.repositoryItemGridLookUpEdit2View.Name = "repositoryItemGridLookUpEdit2View";
            this.repositoryItemGridLookUpEdit2View.OptionsSelection.EnableAppearanceFocusedCell = false;
            this.repositoryItemGridLookUpEdit2View.OptionsView.ShowGroupPanel = false;
            this.gridColumn1.Caption = "T\x00ean bảng chấm c\x00f4ng";
            this.gridColumn1.FieldName = "TimeKeeperTableListName";
            this.gridColumn1.Name = "gridColumn1";
            this.gridColumn1.Visible = true;
            this.gridColumn1.VisibleIndex = 0;
            this.bbeYear.Caption = "Lọc theo năm:";
            this.bbeYear.Edit = this.repYear;
            this.bbeYear.Id = 0x10;
            this.bbeYear.Name = "bbeYear";
            this.bbeYear.Width = 60;
            this.bbeYear.EditValueChanged += new EventHandler(this.bbeYear_EditValueChanged);
            this.repYear.Appearance.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.repYear.Appearance.Options.UseFont = true;
            this.repYear.AutoHeight = false;
            this.repYear.Buttons.AddRange(new EditorButton[] { new EditorButton() });
            this.repYear.Mask.EditMask = "yyyy";
            this.repYear.Name = "repYear";
            this.bbiPrint.Caption = "In";
            this.bbiPrint.Id = 7;
            this.bbiPrint.ImageIndex = 9;
            this.bbiPrint.Name = "bbiPrint";
            this.bbiPrint.ItemClick += new ItemClickEventHandler(this.bbiPrint_ItemClick);
            this.bbiSave.Caption = "Lưu";
            this.bbiSave.Id = 0x11;
            this.bbiSave.ImageIndex = 0x15;
            this.bbiSave.Name = "bbiSave";
            this.bbiSave.Visibility = BarItemVisibility.Never;
            this.bbiSave.ItemClick += new ItemClickEventHandler(this.bbiSave_ItemClick);
            this.bbiExport.Caption = "Xuất";
            this.bbiExport.Id = 4;
            this.bbiExport.ImageIndex = 0x31;
            this.bbiExport.Name = "bbiExport";
            this.bbiExport.ItemClick += new ItemClickEventHandler(this.bbiExport_ItemClick);
            this.bbiLock.Caption = "Kho\x00e1 Sổ";
            this.bbiLock.Enabled = false;
            this.bbiLock.Id = 14;
            this.bbiLock.ImageIndex = 12;
            this.bbiLock.Name = "bbiLock";
            this.bbiLock.ItemClick += new ItemClickEventHandler(this.bbiLock_ItemClick);
            this.bbiOpen.Caption = "Mở Sổ";
            this.bbiOpen.Enabled = false;
            this.bbiOpen.Id = 15;
            this.bbiOpen.ImageIndex = 0x1f;
            this.bbiOpen.Name = "bbiOpen";
            this.bbiOpen.ItemClick += new ItemClickEventHandler(this.bbiOpen_ItemClick);
            this.bbiFinish.Caption = "Ho\x00e0n Th\x00e0nh";
            this.bbiFinish.Enabled = false;
            this.bbiFinish.Id = 10;
            this.bbiFinish.ImageIndex = 0x21;
            this.bbiFinish.Name = "bbiFinish";
            this.bbiFinish.ItemClick += new ItemClickEventHandler(this.bbiFinish_ItemClick);
            this.bbiReload.Caption = "Nạp Lại";
            this.bbiReload.Id = 9;
            this.bbiReload.ImageIndex = 0x2a;
            this.bbiReload.Name = "bbiReload";
            this.bbiReload.ItemClick += new ItemClickEventHandler(this.bbiReload_ItemClick);
            this.bbiClose.Caption = "Đ\x00f3ng";
            this.bbiClose.Id = 13;
            this.bbiClose.ImageIndex = 0x16;
            this.bbiClose.Name = "bbiClose";
            this.bbiClose.ItemClick += new ItemClickEventHandler(this.bbiClose_ItemClick);
            this.dockManager1.AutoHideContainers.AddRange(new AutoHideContainer[] { this.hideContainerLeft });
            this.dockManager1.Form = this;
            this.dockManager1.TopZIndexControls.AddRange(new string[] { "DevExpress.XtraBars.BarDockControl", "DevExpress.XtraBars.StandaloneBarDockControl", "System.Windows.Forms.StatusBar", "DevExpress.XtraBars.Ribbon.RibbonStatusBar", "DevExpress.XtraBars.Ribbon.RibbonControl" });
            this.hideContainerLeft.Controls.Add(this.dockPanel1);
            this.hideContainerLeft.Dock = DockStyle.Left;
            this.hideContainerLeft.Location = new Point(0, 0x1a);
            this.hideContainerLeft.Name = "hideContainerLeft";
            this.hideContainerLeft.Size = new Size(0x13, 600);
            this.dockPanel1.Controls.Add(this.dockPanel1_Container);
            this.dockPanel1.Dock = DockingStyle.Left;
            this.dockPanel1.ID = new Guid("562688f1-5ae7-418e-b080-18d690e64c7d");
            this.dockPanel1.Location = new Point(0, 0);
            this.dockPanel1.Name = "dockPanel1";
            this.dockPanel1.OriginalSize = new Size(280, 200);
            this.dockPanel1.SavedDock = DockingStyle.Left;
            this.dockPanel1.SavedIndex = 1;
            this.dockPanel1.Size = new Size(280, 0x245);
            this.dockPanel1.Text = "Cơ cấu ph\x00f2ng ban";
            this.dockPanel1.Visibility = DockVisibility.AutoHide;
            this.dockPanel1_Container.Controls.Add(this.xucOrganization1);
            this.dockPanel1_Container.Location = new Point(3, 0x19);
            this.dockPanel1_Container.Name = "dockPanel1_Container";
            this.dockPanel1_Container.Size = new Size(0x112, 0x229);
            this.dockPanel1_Container.TabIndex = 0;
            this.xucOrganization1.Dock = DockStyle.Fill;
            this.xucOrganization1.IsClose = CloseOrNew.None;
            this.xucOrganization1.Location = new Point(0, 0);
            this.xucOrganization1.Name = "xucOrganization1";
            this.xucOrganization1.NotSave = false;
            command.Caption = "";
            command.Enable = false;
            command.Visibility = BarItemVisibility.Never;
            button.Add = command;
            command2.Caption = "";
            command2.Enable = false;
            command2.Visibility = BarItemVisibility.Never;
            button.Cancel = command2;
            command3.Caption = "";
            command3.Enable = false;
            command3.Visibility = BarItemVisibility.Never;
            button.Change = command3;
            command4.Caption = "";
            command4.Enable = false;
            command4.Visibility = BarItemVisibility.Never;
            button.Close = command4;
            command5.Caption = "";
            command5.Enable = false;
            command5.Visibility = BarItemVisibility.Never;
            button.Custom = command5;
            command6.Caption = "";
            command6.Enable = false;
            command6.Visibility = BarItemVisibility.Never;
            button.Delete = command6;
            command7.Caption = "";
            command7.Enable = false;
            command7.Visibility = BarItemVisibility.Never;
            button.Export = command7;
            command8.Caption = "";
            command8.Enable = false;
            command8.Visibility = BarItemVisibility.Never;
            button.Filter = command8;
            command9.Caption = "";
            command9.Enable = false;
            command9.Visibility = BarItemVisibility.Never;
            button.FilterCustomer = command9;
            command10.Caption = "";
            command10.Enable = false;
            command10.Visibility = BarItemVisibility.Never;
            button.FilterStock = command10;
            command11.Caption = "";
            command11.Enable = false;
            command11.Visibility = BarItemVisibility.Never;
            button.Find = command11;
            button.GClose = false;
            button.GCommand = false;
            button.GExport = false;
            command12.Caption = "";
            command12.Enable = false;
            command12.Visibility = BarItemVisibility.Never;
            button.Go = command12;
            button.GOption = false;
            button.GPrint = false;
            button.GRecords = false;
            button.GSearchBar = false;
            button.GSettings = false;
            button.GVaildation = false;
            command13.Caption = "";
            command13.Enable = false;
            command13.Visibility = BarItemVisibility.Never;
            button.Import = command13;
            command14.Caption = "";
            command14.Enable = false;
            command14.Visibility = BarItemVisibility.Never;
            button.Next = command14;
            command15.Caption = "";
            command15.Enable = false;
            command15.Visibility = BarItemVisibility.Never;
            button.PageSetup = command15;
            button.PHome = false;
            command16.Caption = "";
            command16.Enable = false;
            command16.Visibility = BarItemVisibility.Never;
            button.Previous = command16;
            command17.Caption = "";
            command17.Enable = false;
            command17.Visibility = BarItemVisibility.Never;
            button.Print = command17;
            command18.Caption = "";
            command18.Enable = false;
            command18.Visibility = BarItemVisibility.Never;
            button.PrintPreview = command18;
            button.PTool = false;
            command19.Caption = "";
            command19.Enable = false;
            command19.Visibility = BarItemVisibility.Never;
            button.Redo = command19;
            command20.Caption = "";
            command20.Enable = false;
            command20.Visibility = BarItemVisibility.Never;
            button.Refresh = command20;
            command21.Caption = "";
            command21.Enable = false;
            command21.Visibility = BarItemVisibility.Never;
            button.Save = command21;
            command22.Caption = "";
            command22.Enable = false;
            command22.Visibility = BarItemVisibility.Never;
            button.SaveAndClose = command22;
            command23.Caption = "";
            command23.Enable = false;
            command23.Visibility = BarItemVisibility.Never;
            button.SaveAndNew = command23;
            command24.Caption = "";
            command24.Enable = false;
            command24.Visibility = BarItemVisibility.Never;
            button.Search = command24;
            command25.Caption = "";
            command25.Enable = false;
            command25.Visibility = BarItemVisibility.Never;
            button.SearchText = command25;
            command26.Caption = "";
            command26.Enable = false;
            command26.Visibility = BarItemVisibility.Never;
            button.Task = command26;
            command27.Caption = "";
            command27.Enable = false;
            command27.Visibility = BarItemVisibility.Never;
            button.Undo = command27;
            command28.Caption = "";
            command28.Enable = false;
            command28.Visibility = BarItemVisibility.Never;
            button.Vaildate = command28;
            command29.Caption = "";
            command29.Enable = false;
            command29.Visibility = BarItemVisibility.Never;
            button.View = command29;
            this.xucOrganization1.RibbonBar = button;
            this.xucOrganization1.Size = new Size(0x112, 0x229);
            this.xucOrganization1.Status = Actions.None;
            this.xucOrganization1.TabIndex = 0;
            this.xucOrganization1.Title = "";
            this.imageCollection2.ImageStream = (ImageCollectionStreamer) manager.GetObject("imageCollection2.ImageStream");
            this.imageCollection2.Images.SetKeyName(0x3d, "Vista (35).ico");
            this.imageCollection2.Images.SetKeyName(0x3e, "Security.ico");
            this.imageCollection2.Images.SetKeyName(0x3f, "RibbonPrintPreview_DocumentMapLarge.png");
            this.imageCollection2.Images.SetKeyName(0x40, "11.png");
            this.imageCollection2.Images.SetKeyName(0x41, "Sua.png");
            this.imageCollection2.Images.SetKeyName(0x42, "Them.png");
            this.imageCollection2.Images.SetKeyName(0x43, "PhanQuyen.png");
            this.imageCollection2.Images.SetKeyName(0x44, "11.png");
            this.imageCollection2.Images.SetKeyName(0x45, "plus.png");
            this.barButtonItem3.Caption = "Lưu";
            this.barButtonItem3.Id = 8;
            this.barButtonItem3.ImageIndex = 10;
            this.barButtonItem3.Name = "barButtonItem3";
            this.bbiTimekeeperTable.Caption = "Theo K\x00fd Hiệu (Dạng 1)";
            this.bbiTimekeeperTable.Id = 0x12;
            this.bbiTimekeeperTable.Name = "bbiTimekeeperTable";
            this.bbiTimekeeperTable.ItemClick += new ItemClickEventHandler(this.bbiTimekeeperTable_ItemClick);
            this.bbiTimekeeperTable1.Caption = "Theo K\x00fd Hiệu (Dạng 2)";
            this.bbiTimekeeperTable1.Id = 0x13;
            this.bbiTimekeeperTable1.Name = "bbiTimekeeperTable1";
            this.bbiTimekeeperTable1.ItemClick += new ItemClickEventHandler(this.bbiTimekeeperTable1_ItemClick);
            this.bbiTimekeeperExtraPrivate.Caption = "Tăng Cường Giờ C\x00f4ng, L\x00e0m Việc Ri\x00eang";
            this.bbiTimekeeperExtraPrivate.Id = 20;
            this.bbiTimekeeperExtraPrivate.Name = "bbiTimekeeperExtraPrivate";
            this.bbiTimekeeperExtraPrivate.ItemClick += new ItemClickEventHandler(this.bbiTimekeeperExtraPrivate_ItemClick);
            this.gcList.Dock = DockStyle.Fill;
            this.gcList.EmbeddedNavigator.Buttons.Append.Visible = false;
            this.gcList.EmbeddedNavigator.Buttons.CancelEdit.Visible = false;
            this.gcList.EmbeddedNavigator.Buttons.Edit.Visible = false;
            this.gcList.EmbeddedNavigator.Buttons.EndEdit.Visible = false;
            this.gcList.EmbeddedNavigator.Buttons.Remove.Visible = false;
            this.gcList.EmbeddedNavigator.TextStringFormat = "{0}/{1}";
            this.gcList.Location = new Point(0x13, 0x49);
            this.gcList.MainView = this.gbList;
            this.gcList.Name = "gcList";
            this.gcList.RepositoryItems.AddRange(new RepositoryItem[] { this.repCal, this.repPopup });
            this.gcList.Size = new Size(0x42e, 0x229);
            this.gcList.TabIndex = 5;
            this.gcList.UseEmbeddedNavigator = true;
            this.gcList.ViewCollection.AddRange(new BaseView[] { this.gbList });
            this.gbList.Appearance.GroupRow.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.gbList.Appearance.GroupRow.Options.UseFont = true;
            this.gbList.Appearance.HeaderPanel.Options.UseTextOptions = true;
            this.gbList.Appearance.HeaderPanel.TextOptions.HAlignment = HorzAlignment.Center;
            this.gbList.Appearance.HeaderPanel.TextOptions.WordWrap = WordWrap.Wrap;
            this.gbList.ColumnPanelRowHeight = 0x20;
            this.gbList.Columns.AddRange(new GridColumn[] { 
                this.colEmployeeCode, this.colFirstName, this.colLastName, this.colBranchName, this.colDepartmentName, this.colGroupName, this.colShiftCode, this.colShift, this.colDay1, this.colDay2, this.colDay3, this.colDay4, this.colDay5, this.colDay6, this.colDay7, this.colDay8, 
                this.colDay9, this.colDay10, this.colDay11, this.colDay12, this.colDay13, this.colDay14, this.colDay15, this.colDay16, this.colDay17, this.colDay18, this.colDay19, this.colDay20, this.colDay21, this.colDay22, this.colDay23, this.colDay24, 
                this.colDay25, this.colDay26, this.colDay27, this.colDay28, this.colDay29, this.colDay30, this.colDay31, this.colTotalHour
             });
            this.gbList.FixedLineWidth = 1;
            this.gbList.FocusRectStyle = DrawFocusRectStyle.RowFocus;
            condition.Appearance.BackColor = Color.Ivory;
            condition.Appearance.Options.UseBackColor = true;
            condition.ApplyToRow = true;
            condition.Column = this.colShift;
            condition.Condition = FormatConditionEnum.Equal;
            condition.Value1 = "Trực đ\x00eam";
            this.gbList.FormatConditions.AddRange(new StyleFormatCondition[] { condition });
            this.gbList.GridControl = this.gcList;
            this.gbList.GroupPanelText = "K\x00e9o v\x00e0 Thả cột v\x00e0o đ\x00e2y để nh\x00f3m dữ liệu";
            this.gbList.IndicatorWidth = 40;
            this.gbList.Name = "gbList";
            this.gbList.OptionsBehavior.AllowIncrementalSearch = true;
            this.gbList.OptionsBehavior.AutoExpandAllGroups = true;
            this.gbList.OptionsBehavior.CopyToClipboardWithColumnHeaders = false;
            this.gbList.OptionsBehavior.FocusLeaveOnTab = true;
            this.gbList.OptionsCustomization.AllowFilter = false;
            this.gbList.OptionsFilter.AllowColumnMRUFilterList = false;
            this.gbList.OptionsFilter.AllowFilterEditor = false;
            this.gbList.OptionsFilter.AllowMRUFilterList = false;
            this.gbList.OptionsLayout.StoreAllOptions = true;
            this.gbList.OptionsLayout.StoreAppearance = true;
            this.gbList.OptionsMenu.EnableColumnMenu = false;
            this.gbList.OptionsMenu.EnableGroupPanelMenu = false;
            this.gbList.OptionsNavigation.EnterMoveNextColumn = true;
            this.gbList.OptionsSelection.InvertSelection = true;
            this.gbList.OptionsSelection.MultiSelect = true;
            this.gbList.OptionsView.AllowCellMerge = true;
            this.gbList.OptionsView.ColumnAutoWidth = false;
            this.gbList.OptionsView.ShowAutoFilterRow = true;
            this.gbList.OptionsView.ShowFilterPanelMode = ShowFilterPanelMode.Never;
            this.gbList.OptionsView.ShowFooter = true;
            this.gbList.OptionsView.ShowGroupPanel = false;
            this.gbList.FocusedRowChanged += new FocusedRowChangedEventHandler(this.gbList_FocusedRowChanged);
            this.gbList.CustomDrawRowIndicator += new RowIndicatorCustomDrawEventHandler(this.gbList_CustomDrawRowIndicator);
            this.gbList.FocusedColumnChanged += new FocusedColumnChangedEventHandler(this.gbList_FocusedColumnChanged);
            this.gbList.CellValueChanged += new CellValueChangedEventHandler(this.gbList_CellValueChanged);
            this.gbList.CellMerge += new CellMergeEventHandler(this.gbList_CellMerge);
            this.gbList.MouseDown += new MouseEventHandler(this.gbList_MouseDown);
            this.gbList.CustomSummaryCalculate += new CustomSummaryEventHandler(this.gbList_CustomSummaryCalculate);
            this.colEmployeeCode.AppearanceHeader.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.colEmployeeCode.AppearanceHeader.Options.UseFont = true;
            this.colEmployeeCode.Caption = "M\x00e3 nh\x00e2n vi\x00ean";
            this.colEmployeeCode.FieldName = "EmployeeCode";
            this.colEmployeeCode.Fixed = FixedStyle.Left;
            this.colEmployeeCode.Name = "colEmployeeCode";
            this.colEmployeeCode.OptionsColumn.AllowEdit = false;
            this.colEmployeeCode.OptionsColumn.AllowMerge = DefaultBoolean.True;
            this.colEmployeeCode.OptionsColumn.ReadOnly = true;
            this.colEmployeeCode.Visible = true;
            this.colEmployeeCode.VisibleIndex = 0;
            this.colFirstName.AppearanceHeader.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.colFirstName.AppearanceHeader.Options.UseFont = true;
            this.colFirstName.Caption = "Họ l\x00f3t";
            this.colFirstName.FieldName = "FirstName";
            this.colFirstName.Fixed = FixedStyle.Left;
            this.colFirstName.Name = "colFirstName";
            this.colFirstName.OptionsColumn.AllowEdit = false;
            this.colFirstName.OptionsColumn.AllowMerge = DefaultBoolean.True;
            this.colFirstName.OptionsColumn.ReadOnly = true;
            this.colFirstName.Visible = true;
            this.colFirstName.VisibleIndex = 1;
            this.colFirstName.Width = 110;
            this.colLastName.AppearanceHeader.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.colLastName.AppearanceHeader.Options.UseFont = true;
            this.colLastName.Caption = "T\x00ean";
            this.colLastName.FieldName = "LastName";
            this.colLastName.Fixed = FixedStyle.Left;
            this.colLastName.Name = "colLastName";
            this.colLastName.OptionsColumn.AllowEdit = false;
            this.colLastName.OptionsColumn.AllowMerge = DefaultBoolean.True;
            this.colLastName.OptionsColumn.ReadOnly = true;
            this.colLastName.Visible = true;
            this.colLastName.VisibleIndex = 2;
            this.colLastName.Width = 0x38;
            this.colBranchName.Caption = "Chi nh\x00e1nh";
            this.colBranchName.FieldName = "BranchName";
            this.colBranchName.Fixed = FixedStyle.Left;
            this.colBranchName.Name = "colBranchName";
            this.colBranchName.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colBranchName.OptionsColumn.ReadOnly = true;
            this.colDepartmentName.Caption = "Ph\x00f2ng ban";
            this.colDepartmentName.FieldName = "DepartmentName";
            this.colDepartmentName.Fixed = FixedStyle.Left;
            this.colDepartmentName.Name = "colDepartmentName";
            this.colDepartmentName.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colDepartmentName.OptionsColumn.ReadOnly = true;
            this.colGroupName.Caption = "Tổ nh\x00f3m";
            this.colGroupName.FieldName = "GroupName";
            this.colGroupName.Fixed = FixedStyle.Left;
            this.colGroupName.Name = "colGroupName";
            this.colGroupName.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colGroupName.OptionsColumn.ReadOnly = true;
            this.colShiftCode.Caption = "M\x00e3 ca l\x00e0m việc";
            this.colShiftCode.FieldName = "ShiftCode";
            this.colShiftCode.Fixed = FixedStyle.Left;
            this.colShiftCode.Name = "colShiftCode";
            this.colShiftCode.OptionsColumn.AllowMerge = DefaultBoolean.False;
            this.colTotalHour.AppearanceCell.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.colTotalHour.AppearanceCell.Options.UseFont = true;
            this.colTotalHour.AppearanceHeader.Font = new Font("Tahoma", 8.25f, FontStyle.Bold);
            this.colTotalHour.AppearanceHeader.Options.UseFont = true;
            this.colTotalHour.Caption = "Tổng giờ";
            this.colTotalHour.FieldName = "TotalHour";
            this.colTotalHour.Fixed = FixedStyle.Right;
            this.colTotalHour.Name = "colTotalHour";
            this.colTotalHour.OptionsColumn.AllowEdit = false;
            this.colTotalHour.OptionsColumn.AllowMerge = DefaultBoolean.True;
            this.colTotalHour.OptionsColumn.ReadOnly = true;
            this.colTotalHour.SummaryItem.SummaryType = SummaryItemType.Custom;
            this.colTotalHour.SummaryItem.Tag = 0;
            this.colTotalHour.Visible = true;
            this.colTotalHour.VisibleIndex = 0x23;
            this.colTotalHour.Width = 50;
            this.panelControl1.BorderStyle = BorderStyles.NoBorder;
            this.panelControl1.Controls.Add(this.flowLayoutPanel3);
            this.panelControl1.Controls.Add(this.flowLayoutPanel2);
            this.panelControl1.Controls.Add(this.flowLayoutPanel1);
            this.panelControl1.Controls.Add(this.lbMessage);
            this.panelControl1.Dock = DockStyle.Top;
            this.panelControl1.Location = new Point(0x13, 0x1a);
            this.panelControl1.Name = "panelControl1";
            this.panelControl1.Size = new Size(0x42e, 0x2f);
            this.panelControl1.TabIndex = 8;
            this.panelControl1.Paint += new PaintEventHandler(this.panelControl1_Paint);
            this.flowLayoutPanel3.Anchor = AnchorStyles.Right | AnchorStyles.Top;
            this.flowLayoutPanel3.Controls.Add(this.xucExpandCollapseButton1);
            this.flowLayoutPanel3.Controls.Add(this.lbGroupName);
            this.flowLayoutPanel3.Controls.Add(this.lbDepartmentName);
            this.flowLayoutPanel3.FlowDirection = FlowDirection.RightToLeft;
            this.flowLayoutPanel3.Location = new Point(0x274, 0x16);
            this.flowLayoutPanel3.Name = "flowLayoutPanel3";
            this.flowLayoutPanel3.Size = new Size(0x1b7, 0x15);
            this.flowLayoutPanel3.TabIndex = 8;
            this.xucExpandCollapseButton1.Location = new Point(0x1a3, 3);
            this.xucExpandCollapseButton1.Name = "xucExpandCollapseButton1";
            this.xucExpandCollapseButton1.Size = new Size(0x11, 15);
            this.xucExpandCollapseButton1.TabIndex = 5;
            this.xucExpandCollapseButton1.ExpandCollapsed += new xucExpandCollapseButton.ExpandCollapsedHander(this.xucExpandCollapseButton1_ExpandCollapsed);
            this.lbGroupName.Anchor = AnchorStyles.Right | AnchorStyles.Top;
            this.lbGroupName.Location = new Point(0x15b, 3);
            this.lbGroupName.Name = "lbGroupName";
            this.lbGroupName.Size = new Size(0x42, 13);
            this.lbGroupName.TabIndex = 4;
            this.lbGroupName.Text = " - GroupName";
            this.lbDepartmentName.Anchor = AnchorStyles.Right | AnchorStyles.Top;
            this.lbDepartmentName.Location = new Point(0x101, 3);
            this.lbDepartmentName.Name = "lbDepartmentName";
            this.lbDepartmentName.Size = new Size(0x54, 13);
            this.lbDepartmentName.TabIndex = 3;
            this.lbDepartmentName.Text = "DepartmentName";
            this.flowLayoutPanel2.Anchor = AnchorStyles.Right | AnchorStyles.Top;
            this.flowLayoutPanel2.Controls.Add(this.lbBranchName);
            this.flowLayoutPanel2.Controls.Add(this.lbCompanyName);
            this.flowLayoutPanel2.FlowDirection = FlowDirection.RightToLeft;
            this.flowLayoutPanel2.Location = new Point(0x274, 1);
            this.flowLayoutPanel2.Name = "flowLayoutPanel2";
            this.flowLayoutPanel2.Size = new Size(0x1b7, 0x12);
            this.flowLayoutPanel2.TabIndex = 7;
            this.lbBranchName.Anchor = AnchorStyles.Right | AnchorStyles.Top;
            this.lbBranchName.Appearance.Font = new Font("Tahoma", 9f, FontStyle.Bold);
            this.lbBranchName.Appearance.Options.UseFont = true;
            this.lbBranchName.Location = new Point(0x15c, 3);
            this.lbBranchName.Name = "lbBranchName";
            this.lbBranchName.Size = new Size(0x58, 14);
            this.lbBranchName.TabIndex = 2;
            this.lbBranchName.Text = " - BranchName";
            this.lbCompanyName.Anchor = AnchorStyles.Right | AnchorStyles.Top;
            this.lbCompanyName.Appearance.Font = new Font("Tahoma", 9f, FontStyle.Bold);
            this.lbCompanyName.Appearance.Options.UseFont = true;
            this.lbCompanyName.Location = new Point(0xfc, 3);
            this.lbCompanyName.Name = "lbCompanyName";
            this.lbCompanyName.Size = new Size(90, 14);
            this.lbCompanyName.TabIndex = 1;
            this.lbCompanyName.Text = "CompanyName";
            this.flowLayoutPanel1.Controls.Add(this.simpleButton1);
            this.flowLayoutPanel1.Controls.Add(this.lbTimeKeeperOverTimeName);
            this.flowLayoutPanel1.Controls.Add(this.ptLock);
            this.flowLayoutPanel1.Controls.Add(this.ptFinish);
            this.flowLayoutPanel1.Location = new Point(4, 4);
            this.flowLayoutPanel1.Name = "flowLayoutPanel1";
            this.flowLayoutPanel1.Size = new Size(0x1e4, 0x13);
            this.flowLayoutPanel1.TabIndex = 4;
            this.simpleButton1.Appearance.Font = new Font("Lucida Console", 9.25f);
            this.simpleButton1.Appearance.Options.UseFont = true;
            this.simpleButton1.Location = new Point(3, 3);
            this.simpleButton1.Name = "simpleButton1";
            this.simpleButton1.Size = new Size(30, 15);
            this.simpleButton1.TabIndex = 14;
            this.simpleButton1.Text = "▼";
            this.simpleButton1.Click += new EventHandler(this.simpleButton1_Click);
            this.lbTimeKeeperOverTimeName.Appearance.Font = new Font("Tahoma", 9f, FontStyle.Bold);
            this.lbTimeKeeperOverTimeName.Appearance.Options.UseFont = true;
            this.lbTimeKeeperOverTimeName.Location = new Point(0x27, 3);
            this.lbTimeKeeperOverTimeName.Name = "lbTimeKeeperOverTimeName";
            this.lbTimeKeeperOverTimeName.Size = new Size(0x10f, 14);
            this.lbTimeKeeperOverTimeName.TabIndex = 0;
            this.lbTimeKeeperOverTimeName.Text = "[Vui l\x00f2ng chọn bảng chấm c\x00f4ng ở ph\x00eda tr\x00ean]";
            this.ptLock.Image = MsgResc.lock_open__1_;
            this.ptLock.Location = new Point(0x13d, 0);
            this.ptLock.Margin = new Padding(4, 0, 0, 0);
            this.ptLock.Name = "ptLock";
            this.ptLock.Size = new Size(0x10, 0x10);
            this.ptLock.TabIndex = 10;
            this.ptLock.TabStop = false;
            this.ptLock.Visible = false;
            this.ptFinish.Image = MsgResc.check;
            this.ptFinish.Location = new Point(0x151, 0);
            this.ptFinish.Margin = new Padding(4, 0, 0, 0);
            this.ptFinish.Name = "ptFinish";
            this.ptFinish.Size = new Size(0x13, 0x10);
            this.ptFinish.TabIndex = 11;
            this.ptFinish.TabStop = false;
            this.ptFinish.Visible = false;
            this.lbMessage.Appearance.ForeColor = Color.DarkBlue;
            this.lbMessage.Appearance.Options.UseForeColor = true;
            this.lbMessage.Location = new Point(4, 0x1c);
            this.lbMessage.Name = "lbMessage";
            this.lbMessage.Size = new Size(0x1e4, 13);
            this.lbMessage.TabIndex = 2;
            this.lbMessage.Text = "[Nếu danh s\x00e1ch l\x00e0 trống bạn c\x00f3 thể nhấn v\x00e0o n\x00fat kế b\x00ean khung chọn để ph\x00e1t sinh dữ liệu chấm c\x00f4ng]";
            this.popupMenu1.LinksPersistInfo.AddRange(new LinkPersistInfo[] { new LinkPersistInfo(this.bbiTimekeeperTable), new LinkPersistInfo(this.bbiTimekeeperTable1), new LinkPersistInfo(this.bbiTimekeeperExtraPrivate, true) });
            this.popupMenu1.Manager = this.barManager1;
            this.popupMenu1.Name = "popupMenu1";
            base.AutoScaleDimensions = new SizeF(6f, 13f);
            base.AutoScaleMode = AutoScaleMode.Font;
            base.Controls.Add(this.gcList);
            base.Controls.Add(this.panelControl1);
            base.Controls.Add(this.hideContainerLeft);
            base.Controls.Add(this.barDockControlLeft);
            base.Controls.Add(this.barDockControlRight);
            base.Controls.Add(this.barDockControlBottom);
            base.Controls.Add(this.barDockControlTop);
            base.Name = "xucTimekeeperTableHour";
            base.Size = new Size(0x441, 0x272);
            this.repPopup.EndInit();
            this.repCal.EndInit();
            this.barManager1.EndInit();
            this.repTimeKeeperList.EndInit();
            this.repositoryItemGridLookUpEdit2View.EndInit();
            this.repYear.EndInit();
            this.dockManager1.EndInit();
            this.hideContainerLeft.ResumeLayout(false);
            this.dockPanel1.ResumeLayout(false);
            this.dockPanel1_Container.ResumeLayout(false);
            this.imageCollection2.EndInit();
            this.gcList.EndInit();
            this.gbList.EndInit();
            this.panelControl1.EndInit();
            this.panelControl1.ResumeLayout(false);
            this.panelControl1.PerformLayout();
            this.flowLayoutPanel3.ResumeLayout(false);
            this.flowLayoutPanel3.PerformLayout();
            this.flowLayoutPanel2.ResumeLayout(false);
            this.flowLayoutPanel2.PerformLayout();
            this.flowLayoutPanel1.ResumeLayout(false);
            this.flowLayoutPanel1.PerformLayout();
            ((ISupportInitialize) this.ptLock).EndInit();
            ((ISupportInitialize) this.ptFinish).EndInit();
            this.popupMenu1.EndInit();
            base.ResumeLayout(false);
        }

        private void InitInterface()
        {
            if (!(this.m_IsLock || this.m_IsFinish))
            {
                this.bbiLock.Enabled = true;
                this.ptLock.Visible = false;
                this.bbiOpen.Enabled = true;
                this.bbiFinish.Enabled = true;
                this.ptFinish.Visible = false;
                this.lbMessage.Text = "Đ\x00e3 mở sổ - Bảng chấm c\x00f4ng được ph\x00e9p chỉnh sửa";
                this.GridViewOpen();
            }
            else if (!(!this.m_IsLock || this.m_IsFinish))
            {
                this.bbiLock.Enabled = false;
                this.ptLock.Visible = true;
                this.bbiOpen.Enabled = true;
                this.bbiFinish.Enabled = true;
                this.ptFinish.Visible = false;
                this.lbMessage.Text = "Đ\x00e3 kho\x00e1 sổ - Kh\x00f4ng được ph\x00e9p chỉnh sửa";
                this.GridViewLock();
            }
            else if (!(this.m_IsLock || !this.m_IsFinish))
            {
                this.bbiLock.Enabled = true;
                this.ptLock.Visible = false;
                this.bbiOpen.Enabled = false;
                this.bbiFinish.Enabled = false;
                this.ptFinish.Visible = true;
                this.lbMessage.Text = "Đ\x00e3 ho\x00e0n th\x00e0nh bảng chấm c\x00f4ng của th\x00e1ng n\x00e0y - Kh\x00f4ng được ph\x00e9p chỉnh sửa";
                this.GridViewLock();
            }
            else if (this.m_IsLock && this.m_IsFinish)
            {
                this.bbiLock.Enabled = false;
                this.ptLock.Visible = true;
                this.bbiOpen.Enabled = false;
                this.bbiFinish.Enabled = false;
                this.ptFinish.Visible = true;
                this.lbMessage.Text = "Đ\x00e3 ho\x00e0n th\x00e0nh bảng chấm c\x00f4ng của th\x00e1ng n\x00e0y - Kh\x00f4ng được ph\x00e9p chỉnh sửa";
                this.GridViewLock();
            }
        }

        public void LoadGrid(int Level, string Code)
        {
            try
            {
                Guid timeKeeperTableListID = this.m_TimeKeeperTableListID;
                this.gcList.DataSource = new HRM_TIMEKEEPER_TABLEHOUR().GetList(Level, Code, timeKeeperTableListID);
            }
            catch
            {
            }
        }

        public void LoadTimeKeeperTableList()
        {
            new HRM_TIMEKEEPER_TABLELIST().AddRepositoryGridLookupEditByYear(this.repTimeKeeperList, this.m_Year);
            this.LoadGrid(this.m_Level, this.m_Code);
        }

        private void panelControl1_Paint(object sender, PaintEventArgs e)
        {
        }

        private void RaiseClosedHandler()
        {
            if (this.Closed != null)
            {
                this.Closed(this);
            }
        }

        private void RaiseTimekeeperTableDeletedHander()
        {
            if (this.TimekeeperTableDeleted != null)
            {
                this.TimekeeperTableDeleted(this);
            }
        }

        private void RaiseTimekeeperTableInsertedHander()
        {
            if (this.TimekeeperTableInserted != null)
            {
                this.TimekeeperTableInserted(this);
            }
        }

        private void RaiseTimekeeperTableSelectedHandler(string Code, Guid TimeKeeperTableListID, int Year, int MenuSelected)
        {
            if (this.TimekeeperTableSelected != null)
            {
                this.TimekeeperTableSelected(this, Code, TimeKeeperTableListID, Year, MenuSelected);
            }
        }

        private void RaiseUnShiftDataHandler(int Month, int Year)
        {
            if (this.UnShiftData != null)
            {
                this.UnShiftData(this, Month, Year);
            }
        }

        private void repPopup_Popup(object sender, EventArgs e)
        {
            this.m_EmployeeCode = this.gbList.GetFocusedRowCellValue(this.colEmployeeCode).ToString();
            this.m_ShiftCode = this.gbList.GetFocusedRowCellValue(this.colShiftCode).ToString();
            DataTable table = new HRM_TIMEKEEPER().GetListByShift(this.m_TimeKeeperTableListID, this.m_EmployeeCode, this.m_ShiftCode, this.m_Date);
            this.xucTimekeepingAdd.SetData(table);
            this.xucTimekeepingAdd.Status = Actions.Update;
        }

        private void repTimeKeeperList_ButtonClick(object sender, ButtonPressedEventArgs e)
        {
            xfmShiftAdd.UnShiftDataHandler handler = null;
            xfmShiftAdd.TimekeeperTableDeletedHandler handler2 = null;
            if (e.Button.Kind == ButtonPredefines.Glyph)
            {
                xfmShiftAdd add = new xfmShiftAdd();
                if (handler == null)
                {
                    handler = (s, m, y) => this.RaiseUnShiftDataHandler(m, y);
                }
                add.UnShiftData += handler;
                if (handler2 == null)
                {
                    handler2 = s => this.RaiseTimekeeperTableDeletedHander();
                }
                add.TimekeeperTableDeleted += handler2;
                add.ShowDialog();
            }
        }

        private void repTimeKeeperList_EditValueChanged(object sender, EventArgs e)
        {
        }

        private void repTimeKeeperList_EditValueChanging(object sender, ChangingEventArgs e)
        {
            this.m_TimeKeeperTableListID = new Guid(e.NewValue.ToString());
        }

        public bool SaveData()
        {
            HRM_TIMEKEEPER hrm_timekeeper = new HRM_TIMEKEEPER();
            foreach (DataRow row in this.dt_Timekeeper.Rows)
            {
                if (hrm_timekeeper.Update(this.m_TimeKeeperTableListID, row["EmployeeCode"].ToString(), row["ShiftCode"].ToString(), Convert.ToDateTime(row["Date"].ToString()), row["Symbol"].ToString(), Convert.ToDateTime(row["TimeIn"].ToString()), Convert.ToDateTime(row["TimeOut"].ToString()), Convert.ToDouble(row["Hour"].ToString()), Convert.ToDouble(row["DayHour"].ToString()), Convert.ToDouble(row["NightHour"].ToString()), Convert.ToDouble(row["PrivateHour"].ToString()), Convert.ToInt32(row["LateMinute"].ToString()), Convert.ToInt32(row["EarlyMinute"].ToString()), Convert.ToBoolean(row["IsOvertime"].ToString()), Convert.ToBoolean(row["IsWork"].ToString()), Convert.ToInt32(row["Sorted"].ToString()), row["Description"].ToString()) != "OK")
                {
                    return false;
                }
            }
            this.dt_Timekeeper.Clear();
            return true;
        }

        private void SetRowCellValue(int RowHandle, string EmployeeCode)
        {
            HRM_TIMEKEEPER_TOTAL hrm_timekeeper_total = new HRM_TIMEKEEPER_TOTAL();
            hrm_timekeeper_total.Get(this.m_TimeKeeperTableListID, EmployeeCode);
            string str = EmployeeCode;
            int rowHandle = RowHandle;
            while (EmployeeCode == str)
            {
                this.gbList.SetRowCellValue(rowHandle, this.colTotalHour, hrm_timekeeper_total.TotalHour);
                rowHandle++;
                try
                {
                    str = this.gbList.GetRowCellValue(rowHandle, this.colEmployeeCode).ToString();
                }
                catch
                {
                    str = "";
                }
            }
            rowHandle = RowHandle - 1;
            try
            {
                str = this.gbList.GetRowCellValue(rowHandle, this.colEmployeeCode).ToString();
            }
            catch
            {
                return;
            }
            while (EmployeeCode == str)
            {
                this.gbList.SetRowCellValue(rowHandle, this.colTotalHour, hrm_timekeeper_total.TotalHour);
                rowHandle--;
                try
                {
                    str = this.gbList.GetRowCellValue(rowHandle, this.colEmployeeCode).ToString();
                }
                catch
                {
                    str = "";
                }
            }
        }

        public void SetTimeKeeperTableList(Guid TimeKeeperTableListID, int Year)
        {
            this.m_Year = Year;
            this.bbeYear.EditValue = this.m_Year;
            if (TimeKeeperTableListID != Guid.Empty)
            {
                this.m_TimeKeeperTableListID = TimeKeeperTableListID;
                new HRM_TIMEKEEPER_TABLELIST().AddRepositoryGridLookupEditByYear(this.repTimeKeeperList, this.m_Year);
                this.bbeTimeKeeperTableListName.EditValue = TimeKeeperTableListID;
            }
        }

        private void ShowHideColumn(int NumberDay)
        {
            switch (NumberDay)
            {
                case 0x1c:
                    this.colDay28.Visible = true;
                    this.colDay29.Visible = false;
                    this.colDay30.Visible = false;
                    this.colDay31.Visible = false;
                    break;

                case 0x1d:
                    this.colDay28.Visible = true;
                    this.colDay29.Visible = true;
                    this.colDay30.Visible = false;
                    this.colDay31.Visible = false;
                    break;

                case 30:
                    this.colDay28.Visible = true;
                    this.colDay29.Visible = true;
                    this.colDay30.Visible = true;
                    this.colDay31.Visible = false;
                    break;

                case 0x1f:
                    this.colDay28.Visible = true;
                    this.colDay29.Visible = true;
                    this.colDay30.Visible = true;
                    this.colDay31.Visible = true;
                    break;
            }
        }

        private void simpleButton1_Click(object sender, EventArgs e)
        {
            this.popupMenu1.ShowPopup(Control.MousePosition);
        }

        private void xucExpandCollapseButton1_ExpandCollapsed(object sender, bool IsExpand)
        {
            if (IsExpand)
            {
                this.gbList.OptionsView.ShowGroupPanel = true;
            }
            else
            {
                this.gbList.OptionsView.ShowGroupPanel = false;
            }
        }

        public delegate void ClosedHandler(object sender);

        public delegate void TimekeeperTableDeletedHandler(object sender);

        public delegate void TimekeeperTableInsertedHandler(object sender);

        public delegate void TimekeeperTableSelectedHandler(object sender, string Code, Guid TimeKeeperTableListID, int Year, int MenuSelected);

        public delegate void UnShiftDataHandler(object sender, int Month, int Year);
    }
}

